I am here wondering, when using DOS FTP and on a remote server i know you can list the contents of the server by using the commands ls or dir but when the list of contents exceeds the screen how can i use something like dir /p to be able to control the flow of the list ? also how do you use mget? i tried something like mget *.jpg and it doesnt work, it only works when i do somehting like 'mget /' or 'mget .' then it gets all the files in the root directory. and one more thing is there a way to switch back and forth from the server directory listing and the local directory listing?
12-06-2005, 07:06 PM
Haven't used the command line ftp for a very long time, so I don't remember exactly which commands it implements.
To use mget(or mput or mdelete) glob is turned off by default. Type glob at the command line to make commands like 'mget /dir/*.jpg' work properly.
Using command line ftp on a UNIX machine I would type '! ls' to get a list of the local dirctory. You might try '! dir' and see if your ftp will recognize it.
nice, thank you very much hyperbole.
does anyone know the one last thing.. on DOS FTP when you're in your server directory and you type dir or ls and the list of files exceeds the screen is there any way to pause it between screen fulls, an example of this is when your going through your local directories you can do this by typing dir /p ???
12-07-2005, 04:43 PM
I just brought up FTP in a command prompt on Windows 2000. It allows me to use '! DIR' to see the local directory and I can page it by using '! DIR /p'.
This version of FTP seems to turn globbing on by default. That is the opposite of the way the documentations says it should be.
If you're using a different version of Windows, you may have different results.
12-07-2005, 04:48 PM
The usual Unix command is 'ls|more'. Don't know if that works with the server over FTP or not but I would think it should.
i have tried ! dir /p and yes this gives me a listing of my local directory and pages it, this was one of my questions, is there any way to page the contents that are on the remote server?
i have tried ls|more with no luck, is there any other way?
12-09-2005, 06:47 PM
What version of windows are you using?
The command prompt in the later versions of Windows has the ability to scroll the window so you should be able to list the directory, then scroll the sindow back and look at the list. However, ls is an FTP command and is being sent to the FTP server for execution. The client program (on your machine) then displays the results on your screen. As far as I know, there is no way to page the results in interactive mode.
What you can do is place a series of FTP command in a text file. Then use a command like
ftp < ftp.in > ftp.out
To redirect the output to a file.
For example: if the file ftp.in contains
FTP will ask you for the password on the command line and then give you a list of the files on the remote machine in the file ftp.out.
damn.. thats the craziest s#!t i ever seen, lol. thank you very much hyperbole. I am using windows98 by the way, this is very impressive to me, lol but then again i am a simple person, thanks again. :D :thumbsup: