Solved

How to copy files from server to server remotely?

Posted on 2008-10-24
8
919 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
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
Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Learn about cloud computing and its benefits for small business owners.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

679 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