Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I want to simplify the transfer of 120 or so Excel spreadsheets from 8 or so locations to a single different LAN location.
We are using long names. My problem is that when I run the batch file it isn't able to find the LAN drives. When I execute the same commands in a DOS window there is no problem.
I just want to go to location A copy the files to location Z, then go to location B and copy the files to location Z etc until all the locations have been processed.
Any idea what I need to do to get this to happen?? Help on this would be great! Thanks.

This is a sample of the type of thing that I am trying to do
echo off
rem This batch file will transfer all of the *.xls files from the following locations
rem
rem w:/Accounts/Budget/Budget 2004/Profit Plans/Canadian Marketing Distribution
rem w:/Accounts/Budget/Budget 2004/Profit Plans/US Marketing Distribution
rem w:/Accounts/Budget/Budget 2004/Profit Plans/Fraternal
rem w:/Accounts/Budget/Budget 2004/Profit Plans/MSD
rem w:/Accounts/Budget/Budget 2004/Profit Plans/operational Projects
rem w:/Accounts/Budget/Budget 2004/Profit Plans/strategic Projects
rem w:/Accounts/Budget/Budget 2004/Profit Plans/Other operational areas
rem w:/Accounts/Budget/Budget 2004/Profit Plans/Service center
rem
rem
rem to the IHQAPPS02\\Budget\Data\Unprocessed folder on the LAN (F: drive)echo " "
echo " Please wait while files are being transfer to BCD application destination "
rem this shows that the X: drive is mapped on the machine
net use
rem This is a test case that basically does a similar function - goes to a specific LAN drive and folder (X:\P\PAMBELL\OTHER) and copies all existing xls file types to a specified location although in this case it is the A: drive. When done in a DOS window it works as a batch file it does not. I have tried putting the full path in the copy statement but I get the invalid path message.
System error 85. The system cannot find the path specified is the current messageX:
cd p
cd pambell
cd other
copy *.xls a:\*.xlsrem C:
pause

Hi Pam,
this should work.
Use xcopy not copy.
(you have to start your batch file from the folder where it is located and the drives have to be mapped.)for example:
xcopy w:\folder\*.xls f:\Budget\Data\
uli

Thanks Uli
That didn't work either.
This is what I'm using
echo " "
echo " Please wait while files are being transfer to BCD application destination "
echo " "
net userem
cd..
rem
cd..
rem
cd..dir
xcopy w:\p\pambell\other\*.xls a:\pause
and this is the response when I 'run' it.
the batch file currently resides on my desktop. As you can see from the NET USE the X:\ drive is mapped. I have tried it with and without the cd statements no difference.
C:\Documents and Settings\pabell\Desktop>echo off
" "
" Please wait while files are being transfer to BCD application destination "
" "
New connections will be remembered.
Status Local Remote Network---------------------
OK E: \\ihqapps02\jea Microsoft Windows Network
OK F: \\ihqapps02\budget Microsoft Windows Network
OK G: \\ihqapps01\timeshts Microsoft Windows Network
OK H: \\Ihqapps02\BankRun Microsoft Windows Network
OK I: \\Ihqapps02\TimeRpt Microsoft Windows Network
OK J: \\ihqapps02\hrms Microsoft Windows Network
OK K: \\ihqfile03\Info_Tech\Application Services
Microsoft Windows Network
OK V: \\ihqfile01\common Microsoft Windows Network
OK W: \\ihqfile01\Info_Tech Microsoft Windows Network
OK X: \\ihqfile03\public Microsoft Windows Network
OK Y: \\ihqfile01\pabell$ Microsoft Windows Network
The command completed successfully.Volume in drive C is Local Disk
Volume Serial Number is FC72-683FDirectory of C:\
11/10/2003 10:31a 0 AClient.cfg
10/09/2003 08:51a 32 AClient.dat
09/22/2003 02:47p <DIR> Altiris
06/24/2003 12:59p <DIR> Attplus
09/18/2003 08:55a <DIR> CDCSWIN40
10/09/2003 08:51a <DIR> Documents and Settings
06/24/2003 12:20p <DIR> INNATETU
09/18/2003 09:11a 2,575 odbcconf.log
09/18/2003 09:06a <DIR> Program Files
05/06/2003 01:15p <DIR> Sales Applications
09/17/2003 01:29p <DIR> Support
11/06/2003 03:57p <DIR> WINNT
3 File(s) 2,607 bytes
9 Dir(s) 12,660,809,728 bytes free
Invalid drive specification
0 File(s) copied
Press any key to continue . . .

Hi again,
I have no idea why it is not working at your
Computer.
I use the xcopy command in batch files without any problem.sorry
uli

![]() |
Norton Commander for MS-D...
|
DOS errors connecting to ...
|

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