Off-topic Talk Where overpaid, underworked S2000 owners waste the worst part of their days before the drive home. This forum is for general chit chat and discussions not covered by the other off-topic forums.

Batch file help needed

Thread Tools
 
Old Apr 8, 2004 | 03:27 PM
  #1  
DC5 Kid's Avatar
Thread Starter
Registered User
 
Joined: Dec 2001
Posts: 623
Likes: 0
From: Santa Fe
Default Batch file help needed

If i open cmd and typed this command it works. But when I put this same command in batch file it doesn't work..anyidea why?

xcopy Z:xxx.* /y "C:Program Filesxxxx.*"
Reply
Old Apr 8, 2004 | 04:54 PM
  #2  
anarky's Avatar
 
Joined: Feb 2004
Posts: 1,324
Likes: 0
From: Milford
Default

Try losing the quotation marks from around the destination.
Reply
Old Apr 8, 2004 | 04:56 PM
  #3  
DC5 Kid's Avatar
Thread Starter
Registered User
 
Joined: Dec 2001
Posts: 623
Likes: 0
From: Santa Fe
Default

i had experience where if you have space between directory i.e. program_files it doesn't work..but i will give it a try
Reply
Old Apr 8, 2004 | 04:57 PM
  #4  
DC5 Kid's Avatar
Thread Starter
Registered User
 
Joined: Dec 2001
Posts: 623
Likes: 0
From: Santa Fe
Default

no luck
Reply
Old Apr 8, 2004 | 05:00 PM
  #5  
anarky's Avatar
 
Joined: Feb 2004
Posts: 1,324
Likes: 0
From: Milford
Default

what else is in the batch file?
Reply
Old Apr 8, 2004 | 05:07 PM
  #6  
DC5 Kid's Avatar
Thread Starter
Registered User
 
Joined: Dec 2001
Posts: 623
Likes: 0
From: Santa Fe
Default

well first it maps the drive z: serverfolder
it maps successfully

then i am runing that command..i don't get it why it works if i type the same command vs putting it in batch file doesn't work....i had successfully copies with xcopy command before from other server
Reply
Old Apr 8, 2004 | 05:13 PM
  #7  
Elistan's Avatar
Registered User
20 Year Member
 
Joined: Oct 2000
Posts: 15,323
Likes: 28
From: Longmont, CO
Default

Maybe xcopy is sensitive to parameter order? Try putting the /y at the very end.
Reply
Old Apr 8, 2004 | 05:14 PM
  #8  
Elistan's Avatar
Registered User
20 Year Member
 
Joined: Oct 2000
Posts: 15,323
Likes: 28
From: Longmont, CO
Default

Better yet, what's the error that xcopy is giving you?
Reply
Old Apr 8, 2004 | 05:25 PM
  #9  
Strike's Avatar
Former Moderator
25 Year Member
Former Moderator
 
Joined: Oct 2000
Posts: 3,826
Likes: 5
From: Denver CO
Default

I just tried it and it worked for me.
Reply
Old Apr 8, 2004 | 05:26 PM
  #10  
DC5 Kid's Avatar
Thread Starter
Registered User
 
Joined: Dec 2001
Posts: 623
Likes: 0
From: Santa Fe
Default

x.* file is not found
Reply



All times are GMT -8. The time now is 05:28 AM.