The Computer Oracle

How do I get Google Drive to open text files with arbitrary extensions as text files?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game 5

--

Chapters
00:00 How Do I Get Google Drive To Open Text Files With Arbitrary Extensions As Text Files?
00:28 Answer 1 Score 1
00:52 Accepted Answer Score 24
01:26 Answer 3 Score 1
01:47 Thank you

--

Full question
https://superuser.com/questions/659666/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#texteditors #googledrive #googledocs #textfiles

#avk47



ACCEPTED ANSWER

Score 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.




ANSWER 2

Score 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.




ANSWER 3

Score 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!