Link to home
Start Free TrialLog in
Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America

asked on

Automate file copy

OS is WIndows 7.


A:   My local development laptop

B:  A remote web server about 40 miles away.

I've been using Remote Desktop Connection to connect to B.  Then I copy the files on A and paste them on B.

I want to do the same thing, but using a batch file (for example) to perform the copying.


How can I do this?


We don't have FTP as an option  (which was my preference) -- I am not sure why ... some firewall thing my employer will not budge on.

ASKER CERTIFIED SOLUTION
Avatar of Scottyworld
Scottyworld
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tom Knowlton

ASKER

For some reason it won't let me map a network drive to that server, even though I can remote desktop to the same server just fine.
If you don't have FTP/SFTP, then I'd use xcopy.

Assuming M is your mapped network drive (I prefer to map the drive, alternatively you could use \\Network_Location\Copy_To_Folder)

xcopy C:\Stuff_To_Copy\*.* M:\Copy_To_Folder /s /e /h /D /v /c /r /y

These attributes will overwrite without prompts, etc.

Info on attributes:

http://www.computerhope.com/xcopyhlp.htm
Remote desktop and shared files are not the same thing. If you have nothing to map a network drive to, then there are no shared folders. Create a new folder (or use existing) on the server, share it with the appropriate permissions, and map the drive or direct your batch commands to the network resource through UNC.
You could use Robo-FTP if you find that you have to copy the files over HTTP... you know they won't block HTTP to your web server :-)
Unless I am mistaken, Robo-FTP is not free.

Are there free alternatives to Robo-FTP?
Thank you.