How To Make A Script

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Let's say I want to do the following on a regular basis:

xcopy c:/folder d:

How do I go about making a simple script for this?

Thanks,

Nospam
 
You need to explain a little more about what you want to do. The example you give is not correct, you need to use a backslash (\), not a forward slash (/). The example you give would copy the files in "c:\folder" to the root of d:, but not the actual folder or any subfolders. Is that what you want? Also, is d: another hard drive or partition, or the CD-ROM? For correct syntax on xcopy, type

xcopy /?

from a command line prompt.

The easiest way to do a simple job like this is with a batch file. With a few exceptions, whatever you would type at the command line, you can put it in a text file and save it with a .bat (or .cmd) file extension (mycopy.bat, for example) then double-click mycopy.bat to run the commands.

--

Bill James
Microsoft MVP - Shell/User

Win9x VBScript Utilities » www.billsway.com/vbspage/
Windows Tweaks & Tips » www.billsway.com/notes_public/
 
Excellent Bill. Thank You!

Nospam

You need to explain a little more about what you want to do. The example
you give is not correct, you need to use a backslash (\), not a forward
slash (/). The example you give would copy the files in "c:\folder" to the
root of d:, but not the actual folder or any subfolders. Is that what you
want? Also, is d: another hard drive or partition, or the CD-ROM? For
correct syntax on xcopy, type

xcopy /?

from a command line prompt.

The easiest way to do a simple job like this is with a batch file. With a
few exceptions, whatever you would type at the command line, you can put it
in a text file and save it with a .bat (or .cmd) file extension (mycopy.bat,
for example) then double-click mycopy.bat to run the commands.

--

Bill James
Microsoft MVP - Shell/User

Win9x VBScript Utilities » www.billsway.com/vbspage/
Windows Tweaks & Tips » www.billsway.com/notes_public/
 

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

Back
Top