gsutil -m cp -R 'gs://[BUCKET]/' 'C:/Users/[USER]/[FOLDER]'
will display the following error
[Errno 22] invalid mode ('ab') or filename: u'C:\\Users\\[USER]\\[FOLDER]\\\\[BUCKET]\\[FILE].gstmp'
I've tried changing the '/'s to '//' to '\' and '\' with no results whatsoever
So, after hours trying to find out this was happening.. it happened that the filenames had a character that can't be used in filenames in windows.. hope this helps if anybody else runs into this error.
Related
I have this command
gsutil rsync -r -x '".*.jpg$"' File Share\data\Home Drive gs://sdefs01/Home Drive
this is to exclude any .jpg file to be copied to my google bucket.
however, it returns an error:
commandexceptions: the rsync command accept at most 2 arguments.
the command example that I refer to is from google cloud support page.
please help.
You need to put the source directory path inside double quotes as it contains spaces.
I get an error when running a powershell script on one of our VMs. The error is:
ERROR: The string starting:
At C:\iso\floppy\Blah.ps1:7
char:95
+ cinst VisualStudio2012Professional -packageParameters "/Features:'WebTools
SQL VCMFCLibraries <<<< ' "
is missing the terminator: '.
The line, as pasted straight from the script is:
cinst VisualStudio2012Professional -packageParameters "/Features:'WebTools SQL VCMFCLibraries ' "
I can't see an error at all, the terminators are all correct, and this line was working fine until a few days ago.
Hoping someone else can see the obvious.
Found the issue. Further up the script file I had added the line
choco sources add -n=Local -s='L:\Chocolatey Package Repository'
It should have been
choco sources add -n Local -s 'L:\Chocolatey Package Repository'
As well as being wrong, it turns out that the = screws up the quote parsing despite the fact that the quotes match up, leading to a weird error further down.
Thank you to everyone who commented, it helped.
I am using gsutil combined with the "rsync" command to upload a business critical files to google storage as a backup. Unfortunately most of the archives and filenames are Greek for example "αντιγραφο.txt". On english files, rsync is ok, but when gsutil tries to sync greek files, it encounters an exception.
The command is:
gsutil -m rsync -d -r H:\Test gs://myserver.com/data
Building synchronization state...
Caught non-retryable exception while listing file://H:\Test: CommandException: Invalid Unicode path encountered
('H:\Test\\xe1\xed\xf4\xe9\xe3\xf1\xe1\xf6\xef (1).txt'). gsutil
cannot proceed with such files present. Please remove or rename this
file and try again. NOTE: the path printed above replaces the
problematic characters with a hex-encoded printable representation.
For more details (including how to convert to a gsutil-compatible
encoding) see gsutil help encoding.
CommandException: Caught non-retryable exception - aborting rsync
I tried to convert the filenames to UTF-8 but I can't find anything that works on my windows cmd. I've searched many sites for iconv native2asciii but I can't locate something useful. The server is Windows 2012 so I cannot use "convmv" to convert filenames to UTF-8.Is there another way to convert all filenames to utf8 in an automated manner before I upload the to the cloud? The archive is 600GB so i can't just zip it and send it, i also want this to run automaticaly through task scheduler.
Thank you very much!
I am trying to run rsync from cygwin in a PowerShell script of a remote folder with having space (File - One) and gets the below error. Tried to escape the space but still it does not work. As in the error, the directory name taken is "/e/Files/File" which is incomplete, whereas the actual folder name should be "/e/Files/File - One/root/" . Also tried the escape the space with multiple backslashes but still same error. What could be issue here?
Write-Output $rsync-cmd
Invoke-Expression -command $rsync_cmd
Command and Error:
C:\cygwin64\bin\bash.exe --login -c 'rsync -tvhPrI --stats jason#10.1.1.100:"/e/Files/File\ -\ One/root/" "/e/Files/File\ -\ One/root"'
receiving incremental file list
rsync: link_stat "/e/Files/File" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1637) [Receiver=3.1.1]
I've just been wrestling with this and all problems solved by running my script through dos2unix to remove rogue ^M
I'm running latexdiff v 0.25 and when I attempt latexdiff-vc --svn -r "myFile with spaces.tex" I get the following command line output:
Working on myFile with spaces.tex svn: 'myFile' is not under version
control Running latexdiff 2 and only 2 non-option arguments required.
Write latexdiff -h to get help Something went wrong in latexdiff.
Deleting myFile with spaces.tex and abort
I'm assuming it's a bug where the right filename isn't passed correctly to svn. The command runs fine on names w/o spaces.
Does anyone know a workaround?
Assuming you are doing this manually, you may be able to use the 8.3 file name that you can get on the command line using dir /x.