Solved

psexec copying files

Posted on 2014-04-25
2
527 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 83

Accepted Solution

by:
oBdA earned 200 total points
ID: 40022250
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
ID: 40022259
Thank you!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
A short film showing how OnPage and Connectwise integration works.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

914 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

14 Experts available now in Live!

Get 1:1 Help Now