Solved

How to copy files from server to server remotely?

Posted on 2008-10-24
8
914 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

895 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

19 Experts available now in Live!

Get 1:1 Help Now