gsutil CommandException: No URLs matched: *.txt

theosgood picture theosgood · Mar 25, 2015 · Viewed 9.6k times · Source

I'm trying to understand how to copy local files to cloud storage using gsutil so I can write a script to move files. I followed the next steps:

C:\Program Files (x86)\Google\Cloud SDK>gsutil ls
gs://sa-upload-test/
C:\Program Files (x86)\Google\Cloud SDK>cd\spare
C:\Spare>gsutil cp *.txt gs://sa-upload-test
CommandException: No URLs matched: *.txt

I changed folder properties and set permissions to everyone, re-ran it and still get the same result. Can anyone tell me what I am missing?

Answer

Chris Dare picture Chris Dare · Feb 12, 2018

It seems gsutil doesn't recognize those files on your local system. Try refreshing your terminal.

In my case, I was uploading django static files so I recollected my static files and it worked.