Moving entire directory tree using scripting

Advertisement

99as
Joined:
Posts:
2

Moving entire directory tree using scripting

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,802
Location:
Prague, Czechia

Re: Moving entire directory tree using scripting

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?

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

Reply with quote

99as
Joined:
Posts:
2

Re: Moving entire directory tree using scripting

For some reason, synchronize worked yesterday night. Thanks for the reply.

martin 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?

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.

Reply with quote

Advertisement

You can post new topics in this forum