01-05-2008, 23:25 | #11 |
Absinthe
Join Date: Sep 2007
Location: Leighton Buzzard
Posts: 1,282
|
Alex you sodding genius! This is what I needed for my final year project dissertation. I got a bit obsessive compulsive with backing it up.
Had a copy on my D:\ drive which is the main location, then a copy in my My Documents on C:\ which is a different physical disk. Then another copy on my external HDD and two more on my two USB pendrives. I really wanted a batch file to copy the fyp.docx file to each of the backup locations. I'm guessing I couldn't make one command copy the file five times but need five different lines of code each with a different location? Also does the batch file need to be in the same folder as the robocopy.exe? |
01-05-2008, 23:30 | #12 | |
Rocket Fuel
Join Date: Jul 2006
Posts: 7,826
|
Quote:
Nope, as long as robocopy.exe is in your PATH the batch file can be anywhere. |
|
01-05-2008, 23:47 | #13 |
Absinthe
Join Date: Sep 2007
Location: Leighton Buzzard
Posts: 1,282
|
Cheers Burble. Perhaps you can explain my real problem then.
I run my robocopy.bat file which is in the same folder as robocopy.exe. However the command prompt says that '`╗┐robocopy.exe' is not recognized as an internal or external command, operable program or batch file. Is it just that I need to add robocopy.exe to my PATH or is something silly going on in Notepad++? |
02-05-2008, 01:12 | #14 |
Screaming Orgasm
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
|
That's because you called both things 'robocopy', you doofus.
Rename the batch file to something else (something will probably bleat at you at some random future date if you rename robocopy.exe). Oh, and only one destination at a time, so you'll need multiple commands. |
02-05-2008, 09:06 | #15 |
Absinthe
Join Date: Sep 2007
Location: Leighton Buzzard
Posts: 1,282
|
Who are you calling doofus? Me, oh Ok.
Cheers. |
03-05-2008, 16:24 | #16 |
Absinthe
Join Date: Sep 2007
Location: Leighton Buzzard
Posts: 1,282
|
Got it working. Woo.
Now to add Robocopy to my PATH. Would adding ";C:\Program Files\Robocopy\Robocopy.exe" work? I put the ";" in because of the preceding entry in the PATH list. |
03-05-2008, 16:26 | #17 |
Screaming Orgasm
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
|
copy robocopy.exe C:\Windows\System32 would work too.
Yeah, I know - trés naughty, but sue me. |
03-05-2008, 16:57 | #18 |
The Stig
Join Date: Jun 2006
Location: Swad!
Posts: 10,713
|
No need to name the exe Marc, just the directory.
And yes Mark, tres naughty
__________________
apt-get moo |
03-05-2008, 17:05 | #19 |
Screaming Orgasm
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
|
Like I said. And besides, it's an official Microsoft utility (they even put it there themselves with Vista).
|
03-05-2008, 17:29 | #20 |
Absinthe
Join Date: Sep 2007
Location: Leighton Buzzard
Posts: 1,282
|
|