Multi Commander > Support and Feedback

Issue with .bat and robocopy.

<< < (2/5) > >>

Mathias (Author):
as Ice-Man said.. You need to check what the difference is from a manually created line and the generated.

Do you get it to work if you hardcode the path in the script ?
is the generated line from MC the same as the manually created that work ?
if not what is different.

MC just generate a bat file that is then sent to cmd.exe to run.

How robocopy work I have no idea of. But if you send it the correct parameters it should work.



nicedreams:
To keep it simple so you can try it on your own PC without all the extra variables.  I'm on Windows 8.1 update 1.


WORKS inside of MC

robocopy D:\scans D:\testfolder
pause


DOES NOT WORK inside of MC  (I have D:\scans in my left pane and D:\testfolder in my right pane within MC when I run it.)

robocopy ${sourcepath} ${targetpath}
pause


I have tried all other variables like ${forcuspath}  and others.

Still get error with entire path on the same line for SOURCE.

Mathias (Author):
I don't have robocopy so I can not test..

But if the command line is exactly the same, and it does not work. it is very strange.. then something is up with robocopy.

ice-man:

--- Quote from: nicedreams on July 07, 2014, 23:31:54 ---To keep it simple so you can try it on your own PC without all the extra variables.  I'm on Windows 8.1 update 1.

WORKS inside of MC

robocopy D:\scans D:\testfolder
pause

DOES NOT WORK inside of MC  (I have D:\scans in my left pane and D:\testfolder in my right pane within MC when I run it.)

robocopy ${sourcepath} ${targetpath}
pause


I have tried all other variables like ${forcuspath}  and others.

Still get error with entire path on the same line for SOURCE.


--- End quote ---
I do not have robocopy either. But did some quick test. and the two command lines are NOT the same

Manually entered that you say works..

--- Code: ---robocopy D:\scans D:\testfolder
--- End code ---

The Generated line by MC will be

--- Code: ---robocopy "D:\scans\" "D:\testfolder\"
--- End code ---

See. They are very different.  The generated have quotes and trailing slashes.
Maybe robocopy do not like quotes and/or trailing slashes.

And when you figure out what it is. Then you can do some bat script magic and remove the quotes or trailing slash if needed

nicedreams:
I already modify a batch script to run backups between folders and was hoping to have the folders opened in the two panes and starting the script that way would be nice, but I guess has issues with robocopy.

I will just stick to my normal batch scripts.

All Windows 7 and 8 have robocopy if you want to try.  Its the main utility for backups and sync in networks and works like a champ.  I'm just testing with 2 test folders and files until it works.


Maybe the author can make a left and right pane variable without quotes and trailing backslash in the next version?  That would be cool.


Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version