up vote 1 down vote favorite
1
share [g+] share [fb]

im looking for a small utility that can copy files over to/from remote windows hosts, and which can take the credentials (domain user and password) as part of its command line, similar to psexec.

i know i can use net use to map the target directory to a drive letter and use xcopy, and i know psexec can upload files to be executed on the remote machine and then delete them, but im looking for a small utility to distribute files to remote hosts that will not be as awkward to use as net use + xcopy

link|improve this question
why can't you use psexec if it does what you need? – Snark Mar 15 '10 at 21:23
it deletes the files afterwards, and it tries to execute them before that :-) i need to just transfer files around – user31255 Mar 16 '10 at 3:55
feedback

3 Answers

up vote 2 down vote accepted

XCopy supports UNC paths.

C:\>xcopy \\computer1\source\*.* \\Computer2\target
C:\>xcopy \\computer1\source\FakeFileNAme.txt C:\

I would imagine with the use of RunAs you should be able to feed it whichever credentials you'd like.

HTH

link|improve this answer
FWIW, practically everything on Windows supports UNC paths - it is not xcopy-specific. – grawity Mar 15 '10 at 20:59
will runas allow me to use a user that cannot log on to the local machine to transfer files to the remote machine ? – user31255 Mar 16 '10 at 3:54
I haven't used RunAs off a domain in quite a while, but I think the "RunAs /netonly" option will do what you're looking for. – techie007 Mar 16 '10 at 4:22
feedback

Not exactly a "small utility", but the pywin32 package of Python for Windows has win32net and win32wnet modules that could be helpful with scripting credentials and such.

link|improve this answer
feedback

You can use robocopy. just open a command window and type robocopy /? to see available options.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.