Bat file

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.
 
S

Shenan Stanley

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. =)
 
D

Darrell S

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.
 
K

Keith

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"
 
D

Darrell S

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
 
D

Darrell S

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.
 
K

Keith

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top