Wednesday, 21 August 2013

How to move a set of files on the same FTP server?

How to move a set of files on the same FTP server?

On the remote FTP server, I have a set of files in the directory
remote.dir1. I would like to move all the files in that directory to
remote.dir2.
I am using lftp and was trying something like this:
lftp> mv remote.dir1/* remote.dir2/
It does not work.
I also tried:
lftp> glob mv remote.dir1/* remote.dir2/
which displays the usage message: Usage: mv <file1> <file2>
However, moving single file works: lftp> mv remote.dir1/file1 remote.dir2/
As a last resort, we can construct a file containing a set of lftp mv
commands and source it.
Are there any solutions I am not aware of?
Or, are there any capable command line tools for the task?

No comments:

Post a Comment