28

I have text files on Google Drive that do not end with the .txt suffix (such as: .r, .bas, .awk...).
I want to view them using the Drive Notepad app, but it does not recognize the files as text.
Is there a way I can get these files to be recognized as text?

killermist
  • 1,949
eliavs
  • 343

3 Answers3

24

If you just want to view the files you can do the following:

  1. Save the file with a .txt extension, i.e. filename.bat becomes filename.bat.txt
  2. Add it to google drive
  3. Remove the .txt extension, filename.bat.txt goes back to filename.bat

Google determines the context type based on the extension and retains that through future file renamings, so you'll be able to view it even after changing back to the original extension.

CitizenX
  • 412
1

You can use anyfile notepad drive app. Link to the app You can also install it directly from google drive (connect apps to drive).

After installation, right click on the file and from open with menu, select anyfile notepad. Then you need to authorize. That's it!

Vahid
  • 111
1

From Support (Drive Notepad) :

If you want to open another type of file you can request it in the Google+ community for Drive Notepad Users.

For only viewing, you can use on Chrome the extension CodeViewer.

An alternative commercial editor, Neutron Drive is not free ($28/year), but it integrates very well with Google Drive.

harrymc
  • 498,455