Click here to Skip to main content
15,898,773 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
See more: (untagged)
I need to move one text file via command promptfrom my system to the server system both on the same network.How to do this? Any Ideas?
Posted
Comments
Sergey Alexandrovich Kryukov 14-Oct-14 2:16am    
"Command prompt" is something for interactive use. Therefore, the question is not about programming. Off-topic.
—SA

Please see my comment to the question. However, they key is this: you cannot move anything if you don't have some service on the remote system which can participate in the operation. On a LAN, a typical service is a file sharing service (the style of your question strongly suggests that you are using a Windows system). In this case, move operation from/to the host with a shared directory is not different from the operations with your local file system. The remove files names can be UNC names. Please see:
http://en.wikipedia.org/wiki/Path_%28computing%29#Uniform_Naming_Convention[^],
http://en.wikipedia.org/wiki/Filename[^].

—SA
 
Share this answer
 
hi Gayathri, You can do that by using the Copy command. You need to access the network drive with the server IP and drive name with $. Here is an example

C++
C:\Users\Gayathri>COPY D:\FileToBeMoved.txt \\192.168.10.5\D$\FileToBeMoved.txt


This will definitely work. Here the IP 192.168.10.5 is the target server where you want to move the file.
 
Share this answer
 

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