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.

Tom KnowltonWeb developerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Its pretty simple if you have rights to access server B remotely
Can you list the files on the C drive of server B by typing
at a cmd prompt on laptopA

if you can, then its a single batch file line of
copy c:\folder_on_A\files_on_A\*.* \\serverB\c$\folder_on_B

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Tom KnowltonWeb developerAuthor Commented:
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:
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

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 :-)
Tom KnowltonWeb developerAuthor Commented:
Unless I am mistaken, Robo-FTP is not free.

Are there free alternatives to Robo-FTP?
Tom KnowltonWeb developerAuthor Commented:
Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 7

From novice to tech pro — start learning today.