Batch files

J

John Garate

I'm using Windows XP. I'm trying to use Xcopy (in a batch file) to copy a
folder on one hard drive to another. Both are NTFS drives. Where can I find
information creating and using batch files with WinXP, and on using Xcopy,
including switches? Also, I find that the command Deltree does not work. Is
there another command I can use that runs without displaying a screen?
 
T

Tom Porterfield

John said:
I'm using Windows XP. I'm trying to use Xcopy (in a batch file) to copy a
folder on one hard drive to another. Both are NTFS drives. Where can I find
information creating and using batch files with WinXP, and on using Xcopy,
including switches? Also, I find that the command Deltree does not work. Is
there another command I can use that runs without displaying a screen?

For a list of xcopy switches, open a command window and type xcopy /?.
Deltree is a DOS command that does not exist in XP. Instead you can use
rd (or rmdir). type rd /? for the switches available.
--
Tom Porterfield
MS-MVP MCE
http://support.telop.org

Please post all follow-ups to the newsgroup only.
 
D

Dennis Lazo

john,

i believe that deltree is no longer included with winxp.

as for xcopy, open a dos emulation window: start > run... > type cmd > enter
on the dos box, type "xcopy/?" without the quotes. you will get all the
switches that are accepted by xcopy.

to use it as a batch file, just type in your complete xcopy command together
with switches and then save it on a text file with an extension of .bat.

double clicking on that .bat file you have created will execute the the
batch file.

further, you may add the "@" (without the quotes) before the command so that
the actual batch command won't be shown inside the dos box.

the dos box will then be closed after everthing has been done by your batch
file.

hope this helps.

--
Regards,
Dennis Lazo

the email address from where this message has been sent from is unmonitored.
e-mails may be sent at http://dennislazo.com/email/.
information herein is provided as is with no warranties, and confers no
rights.
 
T

Tim Slattery

John Garate said:
I'm using Windows XP. I'm trying to use Xcopy (in a batch file) to copy a
folder on one hard drive to another. Both are NTFS drives. Where can I find
information creating and using batch files with WinXP, and on using Xcopy,
including switches? Also, I find that the command Deltree does not work. Is
there another command I can use that runs without displaying a screen?

For a list of commands functions support by XP's console, check here:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx
 
D

Don Taylor

John Garate said:
I'm using Windows XP. I'm trying to use Xcopy (in a batch file) to copy a
folder on one hard drive to another. Both are NTFS drives. Where can I find
information creating and using batch files with WinXP, and on using Xcopy,
including switches? Also, I find that the command Deltree does not work. Is
there another command I can use that runs without displaying a screen?

One small item, there is some disagreement about whether or not Xcopy
handles long versus short file names correctly. Google can find you
a web page for XXcopy that tries to describe the details of this.

I don't know whether that will matter in your situation or not but
some claim this can cause all sorts of grief in some cases.
 

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