Boat Drinks  

Go Back   Boat Drinks > General > Computer and Consoles

Reply
 
Thread Tools Display Modes
Old 01-05-2008, 23:25   #11
MarcLister
Absinthe
 
Join Date: Sep 2007
Location: Leighton Buzzard
Posts: 1,282
Default

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?
__________________
Website (sod all on there!) | MSN | Email
MarcLister is offline   Reply With Quote
Old 01-05-2008, 23:30   #12
Burble
Rocket Fuel
 
Burble's Avatar
 
Join Date: Jul 2006
Posts: 7,826
Default

Quote:
Originally Posted by MarcLister View Post
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?
I think you can add multiple desinations to a single line, it has been a while since I've used it (and I'm using the Macbook so can't check) though. From memory the Robocopy GUI is useful in situations like these.

Quote:
Originally Posted by MarcLister View Post
Also does the batch file need to be in the same folder as the robocopy.exe?
Nope, as long as robocopy.exe is in your PATH the batch file can be anywhere.
Burble is offline   Reply With Quote
Old 01-05-2008, 23:47   #13
MarcLister
Absinthe
 
Join Date: Sep 2007
Location: Leighton Buzzard
Posts: 1,282
Default

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++?
__________________
Website (sod all on there!) | MSN | Email
MarcLister is offline   Reply With Quote
Old 02-05-2008, 01:12   #14
Mark
Screaming Orgasm
 
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
Default

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.
Mark is offline   Reply With Quote
Old 02-05-2008, 09:06   #15
MarcLister
Absinthe
 
Join Date: Sep 2007
Location: Leighton Buzzard
Posts: 1,282
Default

Who are you calling doofus? Me, oh Ok.

Cheers.
__________________
Website (sod all on there!) | MSN | Email
MarcLister is offline   Reply With Quote
Old 03-05-2008, 16:24   #16
MarcLister
Absinthe
 
Join Date: Sep 2007
Location: Leighton Buzzard
Posts: 1,282
Default

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.
__________________
Website (sod all on there!) | MSN | Email
MarcLister is offline   Reply With Quote
Old 03-05-2008, 16:26   #17
Mark
Screaming Orgasm
 
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
Default

copy robocopy.exe C:\Windows\System32 would work too.

Yeah, I know - trés naughty, but sue me.
Mark is offline   Reply With Quote
Old 03-05-2008, 16:57   #18
Daz
The Stig
 
Daz's Avatar
 
Join Date: Jun 2006
Location: Swad!
Posts: 10,713
Default

No need to name the exe Marc, just the directory.

And yes Mark, tres naughty
__________________
apt-get moo
Daz is offline   Reply With Quote
Old 03-05-2008, 17:05   #19
Mark
Screaming Orgasm
 
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
Default

Like I said. And besides, it's an official Microsoft utility (they even put it there themselves with Vista).
Mark is offline   Reply With Quote
Old 03-05-2008, 17:29   #20
MarcLister
Absinthe
 
Join Date: Sep 2007
Location: Leighton Buzzard
Posts: 1,282
Default

Quote:
Originally Posted by Daz View Post
No need to name the exe Marc, just the directory.
Ta muchly.
__________________
Website (sod all on there!) | MSN | Email
MarcLister is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 16:33.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.