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?


3 Answers 3


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.