Zozo24
Zozo24

Reputation: 1

Copy a non-shared file on a local network with a windows command

I'm using Windows 8.

How can I copy a non-shared file from another pc on my home network (another IP)?

This command can copy files, but only shared files:

copy \\{ip address}\Downloads\example C:\example_folder
copy (where and what) to (here) 

I'd like something like this. But I don't know how can I copy a non-shared File? Is there a simple windows command I can run to do this?

Upvotes: 0

Views: 5542

Answers (1)

Stanley_A
Stanley_A

Reputation: 448

You could try mapping a drive first and then doing the copy, then deleting the mapping. e.g.

net use x: \\computer name\share name  
copy x:\Downloads\example C:\example_folder
....

net use x: /delete

where x: is the drive letter to map to locally.

If you don't have a share name, you could use the drive letter in the format of c$ for the c: drive on the remote machine or d$ for d: e.g.

net use x: \\computer name\c$

You will probably need to have a login for the remote machine. If you do, do the following.

net use x: \\computer-name\share-name password /user:username

I can't test this at the moment as I'm on my Linux machine, but give it a go as a guide.

See http://support.microsoft.com/kb/308582 for more details on mapping the drive

Upvotes: 1

Related Questions