Computing.Net > Forums > Programming > XCOPY - Batch Help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

XCOPY - Batch Help

Reply to Message Icon

Name: Tezdread
Date: July 26, 2004 at 14:49:17 Pacific
OS: Win2k WS
CPU/Ram: NA
Comment:

Hi all,

I'm trying to use the xcopy command in a batch file and for some reason it wont work ;-/

this is what I have in the batch file

xcopy "x:\Some Dir1\Sub Dir1\Sub Dir1\Sub Dir1\Dir1\Day-DD-MM-YYYY-XXX_Archive_File.001.Z" "x:\Some Dir1\Sub Dir1\Sub Dir1\Sub Dir2\Dir2"

Unfortunately all the directories have spaces in the names so I have to use the quotation marks.

If I type that into the command line it works but it also opens the file in Winzip, which isn't wants meant to happen??

Can anyone help?




Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: July 26, 2004 at 19:50:20 Pacific
Reply:

Hi,

'Won't work' means that it does not do the copy?

If so, any error msg?



0

Response Number 2
Name: Tezdread
Date: July 27, 2004 at 02:58:24 Pacific
Reply:

the problem seemed to be connected to the network I was running it over yesterday.

Back in the office the copying works fine however I then run into another problem...what I can only think is 'Time'

I use the copy instead of xcopy and this is what I have so far.
----
copy "o:\team folders\support teams\opps supp\knowledge Engineer\transcripts\Mon-??-??-????-WSS_Transcript_Log.001.Z" "c:\temp\self service\wss
kb\Mon-??-??-????-WSS_Transcript_Log.001.Z"
gzip -d "c:\temp\self service\wss kb\Mon-??-??-????-WSS_Transcript_Log.001.Z" "c:\temp\self service\wss kb"
---

When I say the problem is time, I think this because when gzip tries to run but fails saying it can't find the file, but the file is copied over?? How can I make sure that gzip only runs after the file has been completely copied?


0

Response Number 3
Name: Mechanix2Go
Date: July 27, 2004 at 04:45:46 Pacific
Reply:

Hi,

With paths that long, it's a wonder anything works.

But to answer your question, if you know about how long the copy takes, use CHOICE.COM from 98se [works in 2k] and delay the batch long enough for the file to be copied and be available to gzip. Nickey-nouse, but effective.

Or, do:

if exist o:\filename.ext do gzip [blah blah]

M2

Mechanix2Go@Golden-Triangle.com



0

Response Number 4
Name: Tezdread
Date: July 27, 2004 at 14:36:10 Pacific
Reply:

I couldn't find the choice.com file on the system si I'm gonna have to look at the IF option although I'm not to sure of this so any examples anyone might have would be nice?

I'm also looking into using the AT cpmmand but I\m unsure if this will work if I'm not logged into the PC?


0

Response Number 5
Name: Tezdread
Date: July 27, 2004 at 14:45:24 Pacific
Reply:

ah yeah the reason why I'm not sure if it will work if I'm not logged in is because of the mapped drives and access to them without valid user details...guess that\s more to do with Windows permissions rather than programing / scripting


0

Related Posts

See More



Response Number 6
Name: Mechanix2Go
Date: July 27, 2004 at 20:45:23 Pacific
Reply:

Hi,

Yes. Access to a mapped drive is a separate issue.

Send me an email and I'll send you a delay utility.

M2

Mechanix2Go@Golden-Triangle.com



0

Response Number 7
Name: Tezdread
Date: July 28, 2004 at 14:02:11 Pacific
Reply:

nice one : Mechanix2Go

I can't get the AT command to work (o anything even logged in as admin?)

I also found a Win2k version of SCHTASKS that I might try but most of the systems are still WinNT (soon to be upgraded) so this doesn't help to much at the mo...


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: XCOPY - Batch Help

Xcopy exclude help! Please read www.computing.net/answers/programming/xcopy-exclude-help-please-read/12611.html

Batch help - FTP but code cycles? www.computing.net/answers/programming/batch-help-ftp-but-code-cycles/15651.html

Batch Help www.computing.net/answers/programming/batch-help/5335.html