Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am copying file from server to local using DOS command "xcopy "C:\Important Files" D:\Backup /c /d /e /h /i /k /q /r /s /x /y"

Can i use destination name as server instead of local name D:\Backup


Thanks in advance
Posted
Comments
[no name] 5-Oct-13 8:15am    
Yes..you can..
Usha Muhunthan 5-Oct-13 8:34am    
Thank u :-D .. Also i referred the below link already
[no name] 5-Oct-13 8:36am    
glad to help..:)

1 solution

You can check the below link for xcopy

xcopy-command.htm[^]
 
Share this answer
 
Comments
Usha Muhunthan 21-Oct-13 0:45am    
I copy a file from system to system under single LAN. For that first I map the drive from a system to my system, mapped system's shared folder created as my local drive in my system. Then I copy a file from my drive to mapped drive, Finally I disconnect the mapped drive.

My problem is when i hit a break point it copies files else it does not

my code is

<pre>

Shell("cmd /c net use Z: " + ServerIP + " /user:" + ServerUserName + " " + ServerPwd) 'to map drive

Shell("cmd /c xcopy " + filepath + " Z:\CloneFiles", AppWinStyle.NormalFocus, True) 'to copy

Shell("cmd /c Net use Z: /Delete") ' to disconnect mapped drive

</pre>


I dont know what is the problem with my code

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900