Batch file & XCOPY
I have a small network with 2 XPs and 1 Windows 7. The Win 7 PC recently replaced an older XP PC. I have been backing up accounting data from one XP to another XP using a DOS batch file that uses the XCopy command and this has been working fine for several years. An accounting package that resides on the Win 7 PC can access the data on the XP with no problem. I copied the WORKING batch file to the Windows 7 PC and it fails with "Invalid drive specification". The data ON THE XP PC that needs to be copied resides in "c:\accounting\quickbooks" and "c:\accounting\peachtree". On the Windows 7 PC the "c:\accounting" is mapped as "Z". The directories do NOT contain spaces. (1) If I use the DOS prompt I can do a "Dir Z:\" or a "Dir Z:\quickbooks" and it works fine. (2) I can also run the xcopy (see below) command from the batch file at the DOS prompt and it works fine. (3) I can also run the batch file at the DOS prompt and it works fine. The one xcopy command is: XCOPY Z:\QuickBooks\*.* c:\Data\Zipped\QuickBooks\ /E /V /C /H /R /Y The way I run the batch file to test it is: (1) Open explorer (2) Right click on the batch file (3) Do a "Run as administrator" (4) The batch file runs but fails with "invalid drive specification" (1) If I change the XCOPY to copy from c:\... to c:\... on the Windows 7 PC the batch file runs OK. It just won't copy from a mapped networked drive "Z" to "C". For some reason running the batch file as above it does not recognize the "Z" drive. Again, this is a batch file that works correctly on the XP machine. Once I get this to work I want to run it each night as a scheduled task Thanks
April 25th, 2011 10:27pm

It should work if you run it in Task Scheduler. Please try it. If it does not work, please try the steps in the following article. Some Programs Cannot Access Network Locations When UAC Is Enabled http://technet.microsoft.com/en-us/library/ee844140(WS.10).aspx Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
Free Windows Admin Tool Kit Click here and download it now
April 27th, 2011 4:49am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics