PDA

View Full Version : Need xcopy help.....



Chuck Wintle
06-27-2012, 10:49 AM
here is the setup..... computer #1 isolated from the world except thru a network connection to computer #2 . Between them is a shared folder so that files may be sent to computer #2. From computer #1 I want to run a batch file within the shared folder to copy files out to a network location. The batch file works from computer #2 but does not work on computer #1. Should it not work since the folder is shared?
this is the xcopy command i am using....
xcopy C:\SHARE\vib_data O:\Data7\Vibration\40k_Shaker\New_Data

thx.

Lee Ludden
06-27-2012, 11:17 AM
Do you have the same drives mapped on each side? If the folder is shared, you can use the UNC name for each share instead of a drive letter. If the server name is SERVER1 and the share name is Shared you can do>

XCOPY C:\SHARE\Vib_Data \\SERVER1\SHARED\New_Data

or something like that. A possible better option than XCOPY would be to use a freeware file sync software such as SyncBack (http://www.2brightsparks.com/)

Prashun Patel
06-27-2012, 11:26 AM
Does the shared drive reside on Machine #2? If yes, then when running from #1, you should have to reference the workstation name in the source:

XCOPY \\<NAMEOFMACHINE#2>\vib_data (file://\\<NAMEOFMACHINE#2>\vib_data) O:\...

You might also have to 'log in' to the machine if you are not administrator on both machines:

NET USE \\<NAMEOFMACHINE#2>\vib_data (file://\\<NAMEOFMACHINE#2>\vib_data) <PASSWORD? /USER:<ADMINUSERNAME>

When you run it from the command line, what is the error you get?

Are you running Windows Server + XP Workstations?

Chuck Wintle
06-27-2012, 12:41 PM
Do you have the same drives mapped on each side? If the folder is shared, you can use the UNC name for each share instead of a drive letter. If the server name is SERVER1 and the share name is Shared you can do>

XCOPY C:\SHARE\Vib_Data \\SERVER1\SHARED\New_Data

or something like that. A possible better option than XCOPY would be to use a freeware file sync software such as SyncBack (http://www.2brightsparks.com/)

I only need to copy one file at a time as they are result files that are sent on to a folder on the network fro analysis....syncback will work but is not quite what I want.

Chuck Wintle
06-27-2012, 12:45 PM
Does the shared drive reside on Machine #2? If yes, then when running from #1, you should have to reference the workstation name in the source:

XCOPY \\<NAMEOFMACHINE#2>\vib_data (file://\\<NAMEOFMACHINE#2>\vib_data) O:\...

You might also have to 'log in' to the machine if you are not administrator on both machines:

NET USE \\<NAMEOFMACHINE#2>\vib_data (file://\\<NAMEOFMACHINE#2>\vib_data) <PASSWORD? /USER:<ADMINUSERNAME>

When you run it from the command line, what is the error you get?

Are you running Windows Server + XP Workstations?

its 2 machine running windows 7...with a shared folder where data is dropped into it and available on the second computer. The second computer is connected to the network and I can then go to the second computer and upload the file to the netowrk as both computers are in the same room. But I am looking for ways to save time so i made the little .bat file and from the second computer it works great...file are copied over to a netowrk location....but the same .bat file does not work if i try to run it on the first computer...no error message...it just does not copy the file...I need to modify the .bat file but not sure how to do it.

Robert LaPlaca
06-27-2012, 1:46 PM
here is the setup..... computer #1 isolated from the world except thru a network connection to computer #2 . Between them is a shared folder so that files may be sent to computer #2. From computer #1 I want to run a batch file within the shared folder to copy files out to a network location. The batch file works from computer #2 but does not work on computer #1. Should it not work since the folder is shared?
this is the xcopy command i am using....
xcopy C:\SHARE\vib_data O:\Data7\Vibration\40k_Shaker\New_Data

thx.

The way the batch file is written, both machines will need to have the remote drive mapped as O, is that the case? Or use a UNC to reference the remote drive like; xcopy C:\SHARE\vib_data \\<OtherWorkstationname>\Data7\Vibration\40k_Shaker\New_Data