Batch file does not run on ONE machine

User avatar
Michael Abrams
4StarLounger
Posts: 573
Joined: 10 Feb 2010, 17:32

Batch file does not run on ONE machine

Post by Michael Abrams »

copy /y Z:\abramselg_xtmgcoupd.dat R:\"NON-ABRAMS SEBRH ABCs 2018\CLARKE WEST 2018\DEC 2018\TEXT FILES\WEEKLY FILES\12-24"

Z = shared drive
R = Shared drive

I have a batch file that works on my computer, as well as others.
There is one computer it does not work on (both drives are perfectly mapped as on all computers)
When I say doesn’t run, I mean when I click on it, it opens and closes very quickly. When I go to the appropriate folder, no file.

Access/Permissions on the drives are the same.

What should I be looking at as the possible cause of the batch not running only on one computer?

Thank for any clue!

Michael

User avatar
Leif
Administrator
Posts: 7209
Joined: 15 Jan 2010, 22:52
Location: Middle of England

Re: Batch file does not run on ONE machine

Post by Leif »

I can't tell you why it runs on some but not all, but I would write it as:

Code: Select all

xcopy "Z:\abramselg_xtmgcoupd.dat" "R:\NON-ABRAMS SEBRH ABCs 2018\CLARKE WEST 2018\DEC 2018\TEXT FILES\WEEKLY FILES\12-24" /y
Leif

User avatar
Michael Abrams
4StarLounger
Posts: 573
Joined: 10 Feb 2010, 17:32

Re: Batch file does not run on ONE machine

Post by Michael Abrams »

Just tried it and no go.

It went so quick, but I was able to see "Parse Error"

Another fabulous mystery about why it works on others but not this particular computer.

Thanks Leif !

Michael

User avatar
John Gray
PlatinumLounger
Posts: 5408
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: Batch file does not run on ONE machine

Post by John Gray »

Put PAUSE on the line after the XCOPY, to see the error message (if any).
John Gray

"(or one of the team)" - how your appointment letter indicates you won't be seeing the Consultant...

User avatar
Michael Abrams
4StarLounger
Posts: 573
Joined: 10 Feb 2010, 17:32

Re: Batch file does not run on ONE machine

Post by Michael Abrams »

Pause helped immensely.

I hate wasting everyone's time with stuff like this - my co-worker had the path off by one character :blush: . Once that was fixed, VOILA !

Thanks to all who helped and looked. Have a great weekend.

Michael

User avatar
John Gray
PlatinumLounger
Posts: 5408
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: Batch file does not run on ONE machine

Post by John Gray »

Glad you fixed it, and so encouraging that it was someone else's fault !
John Gray

"(or one of the team)" - how your appointment letter indicates you won't be seeing the Consultant...