Is it possible to exclude certain types of files in a folder in Google Drive? E.g. say I wanted to upload everything, except all .txt
files; like *.txt
in a .gitignore file. Is there any way to do this?
-
Related: webapps.stackexchange.com/questions/35474/…– aleFeb 2, 2013 at 22:38
-
Looks like this company may offer something like that for google drive: syncdocs.com -- syncdocs.com/2013/06/…– BeachhouseOct 10, 2019 at 0:50
3 Answers
At this time it's not possible to set upload file exceptions or exclusion rules when uploading a folder from the Web UI.
An alternative among many others is to use your OS file explorer to search for the files to upload and the drag the files from the file explorer window to the desired folder on the Google Drive web UI.
A not so pretty but viable solution would be to use a script (robocopy would suit the job) to copy only the files you would like to upload into a secondary folder and set Google Drive to sync that folder. You could automate the script so it updated the secondary folder on a schedule.
robocopy %OriginalFolder% %GoogleDriveSyncedFolder% /E /Z /TEE /xf *.%FileExtentionToExclude%
Source: https://technet.microsoft.com/en-us/library/cc733145.aspx https://social.technet.microsoft.com/Forums/office/en-US/919ab53c-8a86-439b-bc41-649fce8b9ba1/robocopy-exclude-file-types?forum=w7itprogeneral
As ignoring files in Google Drive is about workarounds, I give you a workaround for folders, It might help you to find a meta-workaround for your specific context
To exclude folders on Windows, I use a simple Powershell script that relocates the desired folders (node_modules) to a different location outside Google Drive, and replaces them with Symbolic links so everything keeps working.
The repo can be found here, along with the instructions to set it up.