Bat file

  • Thread starter Thread starter Darrell S
  • Start date Start date
D

Darrell S

Wow. It's been years since I made batch files. I've forgotten how.

I want to place a bat file on my desktop to copy all files in certain
folders on my C: drive to similar folders on my USB hard drive (F:)

Then I intend to Zip them and send them to my children for safekeeping using
"yousendit.com"

Any help on building the bat file would be appreciated. So far my attempts
have only caused a flash of the screen with no real activity.
 
Darrell said:
Wow. It's been years since I made batch files. I've forgotten how.

I want to place a bat file on my desktop to copy all files in
certain folders on my C: drive to similar folders on my USB hard
drive (F:)
Then I intend to Zip them and send them to my children for
safekeeping using "yousendit.com"

Any help on building the bat file would be appreciated. So far my
attempts have only caused a flash of the screen with no real
activity.

Yeah - give us an example of what you have - we can correct from there. =)
 
Shenan said:
Yeah - give us an example of what you have - we can correct from
there. =)

@ECHO OFF
CLS
ECHO OFF
cd C:\My Documents
copy *.* f:\Backup\My Documents
ECHO.
ECHO.
ECHO. This copies My Documents to F:
ECHO.
ECHO.
 
Darrell said:
Shenan said:
Yeah - give us an example of what you have - we can correct from
there. =)

The correct command is XCOPY
a folder containing spaces must be in inverted commas
open a command prompt and type xcopy /?
certain important switches will be required

@ECHO OFF
CLS
ECHO OFF
XCOPY "C:\My Folder\*.*" "F:\Backup\My Documents"
 
Keith said:
Darrell said:
The correct command is XCOPY
a folder containing spaces must be in inverted commas
open a command prompt and type xcopy /?
certain important switches will be required

@ECHO OFF
XCOPY "C:\My Folder\*.*" "F:\Backup\My Documents"

Works good. Thanks Keith
 
Darrell said:
Works good. Thanks Keith



--

Darrell R. Schmidt
B-58 Hustler History: http://members.cox.net/dschmidt1/
-

FWIW. I found a way to write lengthy path info for my .bat file. Maybe
someone has a slicker way but .... I wanted to copy my Outlook Express email
files. The path was very long and involved. So I went there in Explorer,
right clicked the folder and chose Copy. Then I right clicked my desktop
and pasted a shortcut there. Now I right clicked my shortcut, chose
Properties and highlighted and copied the shortcut info. Now I was able to
just paste the path info into my bat file and add \*.*

Example: "C:\Documents and Settings\Owner\Local Settings\Application
Data\Identities\{2FACB608-D7C6-4C50-B8B9-9D4BF365B8C2}\Microsoft\Outlook
Express"

So My line in my bat file was:
XCOPY /Y /F "C:\Documents and Settings\Owner\Local Settings\Application
Data\Identities\{2FACB608-D7C6-4C50-B8B9-9D4BF365B8C2}\Microsoft\Outlook
Express"\*.* "F:\Backup\Outlook

Works like a champ.
 
Darrell said:
FWIW. I found a way to write lengthy path info for my .bat file. Maybe
someone has a slicker way but .... I wanted to copy my Outlook
Express email files. The path was very long and involved. So I went
there in Explorer, right clicked the folder and chose Copy. Then I
right clicked my desktop and pasted a shortcut there. Now I right
clicked my shortcut, chose Properties and highlighted and copied the
shortcut info. Now I was able to just paste the path info into my
bat file and add \*.*
Example: "C:\Documents and Settings\Owner\Local Settings\Application
Data\Identities\{2FACB608-D7C6-4C50-B8B9-9D4BF365B8C2}\Microsoft\Outlook
Express"

So My line in my bat file was:
XCOPY /Y /F "C:\Documents and Settings\Owner\Local
Settings\Application
Data\Identities\{2FACB608-D7C6-4C50-B8B9-9D4BF365B8C2}\Microsoft\Outlook
Express"\*.* "F:\Backup\Outlook
Works like a champ.

Thats one way ,what i do nowadays is >tool >options >maintenance and change
location of message store
I use G:\Message Store you would use F:\Backup\Outlook
 
Back
Top