A Windows XP help forum. PCbanter

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.

Go Back   Home » PCbanter forum » Microsoft Windows XP » Customizing Windows XP
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Running a Batch File Using XCOPY



 
 
Thread Tools Display Modes
  #1  
Old May 4th 07, 02:47 AM posted to microsoft.public.windowsxp.customize
Eckhart Schmidt
external usenet poster
 
Posts: 2
Default 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  
Old May 4th 07, 09:10 AM posted to microsoft.public.windowsxp.customize
Shenan Stanley
external usenet poster
 
Posts: 10,523
Default 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  
Old May 7th 07, 11:28 PM posted to microsoft.public.windowsxp.customize
No_Name
external usenet poster
 
Posts: 24
Default 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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 11:28 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.