View Full Version : Command Line FTP and Moving Files
mms
Feb 19, 2004, 02:31 AM
When using command line FTP, is it possible to move and rename files on the remote server? mv doesn't work and I can't find a command like that in ftp> help.
Doctor Q
Feb 19, 2004, 02:39 AM
To rename a file on the server, use the commandrename oldname newname
To delete a file from the server, use the commanddelete filename
mms
Feb 19, 2004, 09:57 PM
Thanks. I was trying to use rm and mv, because ls and cd were the same as on your local directory. Is there a way to move files?
Westside guy
Feb 19, 2004, 11:37 PM
Boy most of the servers I work with anymore don't allow FTP because it's totally insecure! But delving into the depths of my memory...
The commands available are going to vary, depending on the daemon that's being used on the server. If you want to see what commands are available, just typing a question mark ("?") from the ftp prompt will usually generate a list.
If you aren't sure what a particular command does, you can usually type "help command_name" (replace "command_name" with the actual command you want info on; for example "help mkdir" will give a brief description of what mkdir does).
Doctor Q
Feb 20, 2004, 01:12 AM
Originally posted by mms
Thanks. I was trying to use rm and mv, because ls and cd were the same as on your local directory.You were trying to be logical! :) You can use mkdir and rmdir too, if they are supported by the particular serve you are using.Is there a way to move files? I assume you meaning moving a file from one directory to another, since you can already use the rename command to "move" a file to another name in the same directory. There is no specific command for moving files that I have heard of. You could try "rename foo ../foo" or "rename foo bar/foo" but I doubt that works. So the only way to "move" a file is to get it, delete it, cd somewhere, and put it again.
mms
Feb 20, 2004, 01:28 AM
Thanks everyone. I was using the help command in ftp but I was unable to find any command that would move files from one directory to another, which was why I was asking. Although Transmit is great, I have found that command line ftp works fine for me, without paying the shareware price.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.