Topic "Moving entire directory tree using scripting"

Author Message
99as
[View user's profile]

Joined: 2010-03-24
Posts: 2
I have a directory locally that I need to move remotely. I want to move the entire local tree using scp, from a windows box to a linux fc6 box. I can do this using the gui by dragging and dropping. I tried the following script:

synchronize remote "C:\temp\download" "/home/ets/tmp"

When I checked the linux box, all the files were copied to /home/ets/tmp rather than preserving the tree. What I want to see is the directory called firmware under c:\temp\download copied to /home/ets/tmp.

I looked also at the put command but that seems to require I give it a file list rather than a directory.

Any suggestions how I can accomplish this?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
99as wrote:
synchronize remote "C:\temp\download" "/home/ets/tmp"

When I checked the linux box, all the files were copied to /home/ets/tmp rather than preserving the tree. What I want to see is the directory called firmware under c:\temp\download copied to /home/ets/tmp.

synchronize preserves the three. I.e. directory C:\temp\download\firmware will become /home/ets/tmp/firmware. Do I understand right that you see files from C:\temp\download\firmware directly in /home/ets/tmp?

Quote:
I looked also at the put command but that seems to require I give it a file list rather than a directory.

It supports both.
_________________
Martin Prikryl
99as
[View user's profile]

Joined: 2010-03-24
Posts: 2
For some reason, synchronize worked yesterday night. Thanks for the reply.

prikryl wrote:
99as wrote:
synchronize remote "C:\temp\download" "/home/ets/tmp"

When I checked the linux box, all the files were copied to /home/ets/tmp rather than preserving the tree. What I want to see is the directory called firmware under c:\temp\download copied to /home/ets/tmp.

synchronize preserves the three. I.e. directory C:\temp\download\firmware will become /home/ets/tmp/firmware. Do I understand right that you see files from C:\temp\download\firmware directly in /home/ets/tmp?

Quote:
I looked also at the put command but that seems to require I give it a file list rather than a directory.

It supports both.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License