2

BACKGROUND

When installing Google File Stream on my PC, it creates a new G: drive, and a directory named My Drive in it, containing a mirror of my Google drive directories and files.

PROBLEM

When using certain software, such as Unity or Android Studio, they specifically say to not keep files and projects in paths that contain white spaces.

Since I keep all my files in the My Drive dir which contains a whitespace, I'm unable to store my Unity (etc.) projects there. Obviously, this isn't some nische feature - it's my ability to sync and backup my projects, an ability I'm paying for.

To clarify, I have tried opening porjects in the My Drive path, and indeed it failed.

THINGS I'VE TRIED

Changing the folder name to, say, MyDrive isn't possible, as can be seen here: error msg prohibiting this

I've spoken to a google representative which didn't offer help or any insights to the problem.

Any workarounds that can let me store projects (in said frameworks) and sync them with my Google Drive account?

  • It’s 2020. Surely all software can deal with spaces now. Have you actually tried? // I strongly suggest you use a proper version control system (like Git) instead. You will probably experience severe performance problems otherwise. – Daniel B Apr 02 '20 at 13:55
  • As Daniel B suggested, you may want to look at a version control system. Github and other services like it allow you to not just store your project, but retains a complete history of each source file in case you wanted to revert a change or find out when a change was made. Google Drive is not a prime choice for storing project source code and resources. – Sam Forbis Apr 02 '20 at 13:59
  • I have tried, and indeed my project didn't work correctly (build errors). (adding to the original post) I do use Git for my projects, but it's "just not right" to have my entire file hierarchy reside in my File Stream drive, and have specific folder in another drive that has no white space. For now I've added shortcuts to my Drive hierarchy pointing to the real folders, but I don't consider that to be a solution... – Alon Emanuel Apr 02 '20 at 13:59
  • By trying I meant to just use Android Studio/whatever with spaces in the path. I very much doubt there’ll actually be any problems. – Daniel B Apr 02 '20 at 14:04
  • Yeah, I meant I tried using Android studio and Unity with spaces in the path, and it didn't work. – Alon Emanuel Apr 02 '20 at 14:13
  • Have this very problem with Scientific Workplace 5.0 – Wynne Jan 16 '22 at 05:37

1 Answers1

0

There are number of ways to map paths in Windows that can workaround the problem.

Probably the best one is to use directory junctions as they are persistent and don't require admin rights.

mklink /j %USERPROFILE%\GDrive "g:\My Drive"

You can also try making symbolic link but it requires admin rights and I'm not aware of any advantages.


Another option is to map path to drive letter using subst or registry. This gives nice short paths and might be preferred if you type it a lot. This is pretty well described in Wikipedia.

  • subst - specific to user session, doesn't survive reboot unless you add it to startup, doesn't require admin:

    subst u: "g:\My Drive"
    
  • registry - persistent system-wide way, needs admin:

    reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices" /v "U:" /d "\\??\\G:\My Drive"
    

    then reboot

Marcin Wisnicki
  • 370
  • 4
  • 12