Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, April 4, 2017 9:29 PM
Hi,
I have been using robocopy ver. 6x for years to do backups and backups were logged. The .bat file to run the backup has not been changed. Suddenly, the program reports error of invalid parameter "/LOG:" and refuses processing the backup. This worked in March but it does not work now.
ERROR : Invalid Parameter #9 : "/LOG:"
Then I went to the internet and got ver 10.x to try if my older version does not cooperate with W10 for any reason now. Same error received.
If the /LOG: parameter is removed from the code the backup runs with both versions.
Replacing the /LOG: with /UNILOG: triggers the same error report, now calling /UNILOG: an invalid parameter.
Simultaneously, the PRN refused to complete a print out of robocopy instructions after the following c:\print robocopy.txt saying "Unable to initialize device PRN" (The two may not be related at all ??) Suspecting that something went wrong with my Windows 10.
Can somebody help me a little, please?
All replies (9)
Thursday, April 6, 2017 3:05 PM âś…Answered
[5] Additionally, i changed the command by removing the space in log file: :
C:\windows\system32\robocopy C:\Users\Desktop F:\Desktop /R:2 /W:30 /np /TEE
logfile :D:\Data\DesktopBasket\Robocopy\BckpLogs\BackupLogBackupsF.txt
Result: 'The filename, directory name, or volume label syntax is incorrect.' (copies completed)
Becuase of persistence of 'The filename, directory name, or volume label syntax is incorrect.' message, i changed the directory to simply D:\ then gave different file name, nothing changed the message.
Aaahh....
Tuesday, April 4, 2017 10:31 PM
What is the path you are trying save the log too? Is it root of C: (Windows 10 does not allow that), does it have spaces?
Tuesday, April 4, 2017 11:09 PM
An example of the paths that has worked for 3 years (or more?) was /LOG:D:\Data\DesktopBasket\Robocopy\BckpLogs\BackupLogHPF.txt. The logs from March are still there. Logging for every backup .bat was good till this month. [I love your pen name]
Wednesday, April 5, 2017 5:27 PM
Well might not be much help, but the old 'works for me'
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\Frog>powershell -Command $PSVersionTable.BuildVersion
Major Minor Build Revision
10 0 14393 953
C:\Users\Frog>robocopy C:\Users\Frog D:\Data\DesktopBasket\Frog /E /R:0 /W:0 * /LOG:D:\Data\DesktopBasket\Robocopy\BckpLogs\BackupLogHPF.txt
Log File : D:\Data\DesktopBasket\Robocopy\BckpLogs\BackupLogHPF.txt
C:\Users\Frog>
If I try to log to an invalid path or the root of C: (access denied) I get Invalid Parameter #7 so wondering what #9 means. Have you tried any other location to save the log? Just thinking a file system funny in that file \ folder might be causing it.
Thursday, April 6, 2017 2:48 PM
Hi, thank you for the suggestion. I tried it immediately (after the night shift...)
My W version is 10.0.14393, also.
[1] original error message
C:\windows\system32\robocopy C:\Users\Desktop F:\Desktop /R:2 /W:30 /np /TEE /LOG:D:\Data\DesktopBasket\Robocopy\BckpLogs\BackupLogBackupsF.txt
Result: 'ERROR : Invalid Parameter #10 : "/LOG:D:\Data\DesktopBasket\Robocopy\BckpLogs\BackupLogBackupsF.txt"' (no file copied)
[2] the structure you suggested
C:\windows\system32\robocopy C:\Users\Desktop F:\Desktop /R:2 /W:30 /np /TEE /LOG:D:\Data\DesktopBasket\Robocopy\BckpLogs\BackupLogBackupsF.txt
log file:D:\Data\DesktopBasket\Robocopy\BckpLogs\BackupLogBackupsF.txt
Result: 'ERROR : Invalid Parameter #10 : "/LOG:D:\Data\DesktopBasket\Robocopy\BckpLogs\BackupLogBackupsF.txt"' (no file copied)
[3] removed the first /log: switch
C:\windows\system32\robocopy C:\Users\Desktop F:\Desktop /R:2 /W:30 /np /TEE
log file:D:\Data\DesktopBasket\Robocopy\BckpLogs\BackupLogBackupsF.txt
Result: 'log' is not recognized as an internal or external command, operable program or batch file.' (copies completed)
[4] put the /log: switch into a new line
C:\windows\system32\robocopy C:\Users\Desktop F:\Desktop /R:2 /W:30 /np /TEE
/LOG:D:\Data\DesktopBasket\Robocopy\BckpLogs\BackupLogBackupsF.txt
Result: 'The filename, directory name, or volume label syntax is incorrect.' (copies completed)
The directory is positively correct. I cannot see a problem with the syntax.
Is there a thing that I am missing, Mr Happy? MS had a good thing, robocopy ver. 6.x and they had to ruin it for me...
Thursday, April 6, 2017 6:00 PM | 1 vote
Ok;
C:\Users\Desktop does not exit for me (changed to C:\Users\Frog)
two spaces after /np had to remove them
one space after /TEE had to remove it
need the folder structure in place on D: to get that work.
So I need to be exact in the command on one line no extra spaces. The directory the destination of the log file is written too has to pre exist.
Also noticed if an earlier parameter errors (like the spaces after /np) it displays the whole end of the command as the error which is misleading perhaps as it is the first thing listed that is wrong.
Can you remove extra spaces, check the logfile location exists before and try that?
Friday, April 7, 2017 4:53 AM
I have this command line now:
C:\windows\system32\robocopy C:\Users\Winnie\Desktop F:\Desktop /EFSRAW /S /COPY:DAT /R:2 /W:30 /np /TEE
logfile:D:\Data\DesktopBasket\Robocopy\Robocopy files\BckpLogs\BackupLogDesktopF.txt
Result: backup completes, no log. Message: 'The filename, directory name, or volume label syntax is incorrect.' The address of the file is copied from the address bar and the log has been used for years. Like I said in my initial question, all was working (including extra spaces in the command line) for years until something happened that I did not do and do not know and makes no sense.
For the sake of diligence, I tried the following command line, also:
C:\windows\system32\robocopy C:\Users\Winnie\Desktop F:\Desktop /EFSRAW /S /COPY:DAT /R:2 /W:30 /np /TEE /LOG:D:\Data\DesktopBasket\Robocopy\Robocopy files\BckpLogs\BackupLogDesktopF.txt
Result: ERROR : 'Invalid Parameter #11 : "files\BckpLogs\BackupLogDesktopF.txt"' No backup made. 'Robocopy files' is a folder name in the file address. The system looks at it the wrong way. Suspicious for the space in the name being a problem...
I changed the line to this:
C:\windows\system32\robocopy C:\Users\Winnie\Desktop F:\Desktop /EFSRAW /S /COPY:DAT /R:2 /W:30 /np /TEE /LOG:D:\Backup.txt the backup completed and LOG WAS MADE!!!!
Summary: your suggestion of no extra space has to (apparently) be implemented in the log file address names, also. (Again, for years, those extra spaces did not cause ANY problems! I think, what happened is that W10 decided not to allow the robocopy Ver 6.x any more and the more fussy ver 10.x was activated. Just a guess...)
THANK YOU, THANK YOU, THANK YOU!!!
Sunday, March 25, 2018 8:20 PM
I know this is an older post, but I was having the same issue using RoboMirror program which is essentially the same as Robocopy but with the GUI. I had to right-click the program and "Run As Administrator", then it /log switch would work every time. Might want to try that with Command Prompt or Powershell, depending on what you're using.
Tuesday, October 9, 2018 6:57 AM
Hi,
I had the same problem and it was a permission issue on the log folder.
I fixed the ACLs and everything worked.
Hope it helps,
Francesco