Solved

How to copy files from server to server remotely?

Posted on 2008-10-24
8
920 Views
Last Modified: 2012-06-21
I have a 2 Windows 2003 servers, 1 dev, 1 stage.
Currently dev is mapped to stage with a simple folder share mapping.
Right now I log onto the dev server via RDP, and run an xcopy batch that copies from dev D:\www to the stage drive share Z:\www

I have to find a way to do this remotely without logging onto either server.
I tried psexec, but can't get it to work with mapped drives.
What other way can I copy these files, and I am open to an alternative other than mapped shares, I just need a solution where I don't have to logon to the server.

I thought about a manual scheduled task just running my batch, but I have no way to execute a scheduled task remotely either, but that would work also if there was a way. I need to execute this copy at will remotely, and I'm no developer. =/

Thank you.
0
Comment
Question by:jonburk
[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
8 Comments
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 500 total points
ID: 22799733
You can't do it with mapped drives because mapped drives don't exist within the context of psexec.  Just use the UNC.

So instead of Z:, if Z is mapped to \\server2\share then use that instead of z:
0
 
LVL 1

Expert Comment

by:moojee
ID: 22799802
Hi,

If you use a scheduled task you don't need to execute it remotely!
this is the work of a scheduled task.

You can't use it?
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22799853
in which case you still want to use the UNC, not a mapped drive letter.

0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

Author Comment

by:jonburk
ID: 22813084
I can't use just a schedulted task because they need to happen at will, not a set time interval. The scripts load development files to the test server, so the developer needs to be able to have the server load files at command so they can load, test, change the code, load, test, etc.

Is there a way I can make a manual scheduled task and let the developer start that task remotely whenever they want?
0
 
LVL 1

Expert Comment

by:moojee
ID: 22818145
tried to use the unc instead of a mapped drive in your xcopy script (run by psexec)?
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22818169
moojee: Yeah, I suggested that a couple of times.
0
 
LVL 1

Expert Comment

by:HudsonMarine
ID: 22898222
I am also trying to do something like this only i cant get psexec to work remotely with a mapped drive either and I am also trying to run a bat file remotely but it still says it cant find the destination

I changed my bat file from this:

copy s:\ProdDB\CONDB\CONDB\HMMSA.mdb %USERPROFILE%\myDocu~1\TECHDB\

to use the UNC like this:

copy \\HMMSNJ01\ProdDB\CONDB\CONDB\HMMSA.mdb %USERPROFILE%\myDocu~1\TECHDB\

but it still says the same thing:

The system cannot find the path specified.


am I writing the UNC correctly in my bat file?

is there a way to map the drive in the bat file so i can get the bat file to do its function which is copy a file from a server to the target PC?

I also listed my question here with no avail:

http://forum.sysinternals.com/forum_posts.asp?TID=16742

Thanks for anyone who can help.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

739 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