Solved

psexec copying files

Posted on 2014-04-25
2
535 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 84

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Correct way to use if / else command 3 88
What does "Installable" mean within Diskpart Detail Volume properties? 12 259
network copying issue 4 71
Windows updates batch files 7 106
Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

749 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