Solved

psexec copying files

Posted on 2014-04-25
2
524 Views
Last Modified: 2014-04-25
HI: stergium,qlemo and gurutc very kindly helped me set up a remote execution of a batch file. I This is great and I was wondering if psexec does more:
I am wanting to copy a file now, to the local directory of the server.
Does psexec allow me to copy a file from r:\data\deliveries\mapper.csv to c:\mapsuploader\mapper.csv, if the R drive is the same for pc and server, and a file of that name already exists (ie overwrite)?
Thanks!
0
Comment
Question by:ClaytonGlass
2 Comments
 
LVL 82

Accepted Solution

by:
oBdA earned 200 total points
Comment Utility
No; psexec will only copy the program to be executed to the remote machine.
But nothing keeps you from using a batch script to first copy the file from your client and then run psexec:
@echo off
setlocal
copy R:\data\deliveries\mapper.csv \\Server\C$\mapsuploader\mapper.csv
psexec \\Server -h C:\mapsuploader\mapsuploader.exe C:\mapsuploader\mapper.csv

Open in new window

0
 

Author Closing Comment

by:ClaytonGlass
Comment Utility
Thank you!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now