If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Running a Batch File Using XCOPY
I wrote what I thought was a simple batch file to copy a directory
("Timeprog") and all subfolders from my C: drive to my E:\ drive, The following line was put into a batch file named "Timecopy.bat" which resides on my C: drive. XCOPY C:\TIMEPROG\ E:\TIMEPROG /S /E When I run the file, a DOS window appears briefly, closes, but nothing happens. What am I missing to make a working batch file, please? Ed Aleks |
Ads |
#2
|
|||
|
|||
Running a Batch File Using XCOPY
Eckhart Schmidt wrote:
I wrote what I thought was a simple batch file to copy a directory ("Timeprog") and all subfolders from my C: drive to my E:\ drive, The following line was put into a batch file named "Timecopy.bat" which resides on my C: drive. XCOPY C:\TIMEPROG\ E:\TIMEPROG /S /E When I run the file, a DOS window appears briefly, closes, but nothing happens. What am I missing to make a working batch file, please? When trying to write a batch script - make sure the commands actually work when ran alone... Try opening a command prompt and typing in the line you gave/are trying to use. I bet you get something like: Invalid path 0 File(s) copied .... in return. Now, type: XCOPY /? .... and press ENTER and read up on the command line options. Then try: XCOPY C:\TIMEPROG\*.* E:\TIMEPROG /S /E /I -- Shenan Stanley MS-MVP -- How To Ask Questions The Smart Way http://www.catb.org/~esr/faqs/smart-questions.html |
#3
|
|||
|
|||
Running a Batch File Using XCOPY
Eckhart Schmidt wrote: I wrote what I thought was a simple batch file to copy a directory ("Timeprog") and all subfolders from my C: drive to my E:\ drive, The following line was put into a batch file named "Timecopy.bat" which resides on my C: drive. XCOPY C:\TIMEPROG\ E:\TIMEPROG /S /E When I run the file, a DOS window appears briefly, closes, but nothing happens. What am I missing to make a working batch file, please? Ed Aleks Always use dynamic pathes with such commands like: %SystemDrive% %WinDir% ......... this migh help. NEO |
#4
|
|||
|
|||
Running a Batch File Using XCOPY
|
Thread Tools | |
Display Modes | |
|
|