Morten Hjorth Nielsen
Morten Hjorth Nielsen

Reputation: 79

How do i copy/move all files and subfolders from the current directory to a Google Cloud Storage bucket with gsutil

I'm using gsutil and I need to copy a large number of files/subdirectories from a directory on a windows server to a Google Cloud Storage Bucket.

I have checked the documentation but somehow I can't seem to get the syntax right - I'm trying something along these lines:

c:\test>gsutil -m cp -r . gs://mytestbucket

But I keep getting the message:

CommandException: No URLs matched: .

What am I doing wrong here?

Regards

Morten Hjorth Nielsen

Upvotes: 2

Views: 3406

Answers (1)

Christiaan
Christiaan

Reputation: 2725

Try gsutil -m cp -r * gs://mytestbucket

Or gsutil -m cp -r *.* gs://mytestbucket

Or if your local directory is called test go one dir up and type: gsutil -m cp -r test gs://mytestbucket

Not sure which syntax you need on Windows, but probably the first.

Upvotes: 4

Related Questions