rsync --dry-run --archive --delete --progress --stats --whole-file --no-xattrs
--human-readable --quiet --exclude-from=G:\mptn\etc\rsync_exclude
--log-file=G:tmp\log\rsync_NAS_backup.log
G:\DESKTOP\MISC INFO\ V:\PUBLIC\DOCUMENTS\MISC INFO
still gives me the following error from rsync:
[...]
Sure. Have you tried to enquote the dirnames?
rsync ... "G:\DESKTOP\MISC INFO\" "V:\PUBLIC\DOCUMENTS\MISC INFO"
If you call that from a REXX script, you have two choices: Use surrounding single quotes for the entire rsync call including args or double all contained double quotes and surround it with double quotes.
The single quote option would be much easier to read.
For automatically enquoting a filename, if required, I use something like this:
Enquote:
rc = 0
PARSE ARG Filename
IF VERIFY( Filename, ' &|<>', 'M') <> 0 THEN
Filename = '"'Filename'"'
RETURN( Filename)
Then you could change the rsync call to:
Cmd = 'rsync ... 'Enquote( 'G:\DESKTOP\MISC INFO\') Enquote( 'V:\PUBLIC\DOCUMENTS\MISC INFO')
Cmd
and use either single or double quotes to make the interpreter submit that to CMD.EXE.
Edit: Damned. The third version of the Cmd should finally work. (Much easier when you have syntax highlighting.)