move multiple files in ftp

move multiple files in ftp

Post by Feli » Fri, 22 Jun 2001 04:31:43



I could move one file at a file but wonder how to move multiple files at a
time.  Any thoughs would be appreciated!

ftp>put foo.jpg
ftp>mkdir pic
ftp>rename foo.jpg pic/foo.jpg

Fei (Felix) Liu

 
 
 

move multiple files in ftp

Post by Barry Margoli » Fri, 22 Jun 2001 05:14:59




Quote:>I could move one file at a file but wonder how to move multiple files at a
>time.  Any thoughs would be appreciated!

>ftp>put foo.jpg
>ftp>mkdir pic
>ftp>rename foo.jpg pic/foo.jpg

Why don't you just put it into the pic directory in the first place?

ftp>mkdir pic
ftp>cd pic
ftp>put foo.jpg

If you want to put multiple files, use mput:

ftp>mput *.jpg

--

Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

move multiple files in ftp

Post by Feli » Fri, 22 Jun 2001 06:47:43




> >I could move one file at a file but wonder how to move multiple files at a
> >time.  Any thoughs would be appreciated!

> >ftp>put foo.jpg
> >ftp>mkdir pic
> >ftp>rename foo.jpg pic/foo.jpg

> Why don't you just put it into the pic directory in the first place?

Thanks for your reply. My friend asks me to help on this. he may have put
all the jpg file in the root folder, then wants to make the structure
more clear.  He may doesn't have an telnet account.  He could definitely
use WS_FTP or any windows ftp client to select all / drag&drop ( is it
implemented by basic ftp command?), but we are  wondering whether we can
do it from command line.
Quote:> ftp>mkdir pic
> ftp>cd pic
> ftp>put foo.jpg

> If you want to put multiple files, use mput:

> ftp>mput *.jpg

 
 
 

move multiple files in ftp

Post by Barry Margoli » Fri, 22 Jun 2001 08:10:16






>> >I could move one file at a file but wonder how to move multiple files at a
>> >time.  Any thoughs would be appreciated!

>> >ftp>put foo.jpg
>> >ftp>mkdir pic
>> >ftp>rename foo.jpg pic/foo.jpg

>> Why don't you just put it into the pic directory in the first place?

>Thanks for your reply. My friend asks me to help on this. he may have put
>all the jpg file in the root folder, then wants to make the structure
>more clear.  He may doesn't have an telnet account.  He could definitely
>use WS_FTP or any windows ftp client to select all / drag&drop ( is it
>implemented by basic ftp command?), but we are  wondering whether we can
>do it from command line.

No, I don't think there's a multiple-rename command in the standard Unix
ftp client.

--

Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

move multiple files in ftp

Post by Ed All » Sat, 30 Jun 2001 02:01:03








>>> >I could move one file at a file but wonder how to move multiple files at a
>>> >time.  Any thoughs would be appreciated!

>>> >ftp>put foo.jpg
>>> >ftp>mkdir pic
>>> >ftp>rename foo.jpg pic/foo.jpg

>>> Why don't you just put it into the pic directory in the first place?

>>Thanks for your reply. My friend asks me to help on this. he may have put
>>all the jpg file in the root folder, then wants to make the structure
>>more clear.  He may doesn't have an telnet account.  He could definitely
>>use WS_FTP or any windows ftp client to select all / drag&drop ( is it
>>implemented by basic ftp command?), but we are  wondering whether we can
>>do it from command line.

>No, I don't think there's a multiple-rename command in the standard Unix
>ftp client.

    WS_FTP is able to do what you want because it already has the list
    of filenames so it can know what commands to issue to the remote
    server.

    Obtain a list of the files to be moved with the 'dir' command.

    Then process that list with:


    Then invoke 'ftp' as:

        ftp -i remote-system <moves

    The 'sed' transforms the 'dir' output lines into lines like:

        rename foo.jpg pic/foo.jpg

    which are then sent to the remote end as a batch of individual
    'rename' commands.
--
Microsoft is trying to add to the list of biggest lies of all time:
"Hi. I'm from Microsoft and I am here to protect you from the threat of
the GPL."