Jump to content

ftp - commandline another problem page2 - help


DLSS
 Share

Recommended Posts

ok im getting into command line on windows (if thats wot they actually call it on windows ,)

and i can now use it to contact my ftp and download from it.

only problem is were do thefiles end up ?

dont recommend me to use a ftp prog cos i wanna get used to this , i can use filezilla but wanna do it this way .... .

also is there a way to change the destination folder ?

Link to comment
Share on other sites

They go to the working directory of ftp. The working directory changes depending on what directory you are currently in. For example, if you are in C: and you run ftp, C: will be the working directory for that session.

Link to comment
Share on other sites

yeah, what he said. when you launch CMD, it might say something like:

C:Documents and SettingsUser>

right before your cursor. If you use the DOS command CD you can change the directory you're in and it will download the files to there.

Link to comment
Share on other sites

You can't recursively delete on FTP with a single command.

When you use a graphical client you'll also see it run a HUGE amount of DELE commands against the server to clear out a folder before removing the folder itself. Worse yet, I don't even believe the FTP protocol allows wildcards in a DELE command. Your client may accept it, but in the background just get a listing, figure out which files match and then delete those one-by-one.

Since FTP has 2 sides to consider when moving around in directories, command line FTP has slightly different commands for the local side. For instance 'CD <dir>' will move you to <dir> on the remote side, but 'LCD <dir>' will move you to <dir> on the client side. Just use the HELP command to get a listing of supported commands, and use a bit of logical thinking to figure out what the commands do. It's not as easy as FTP using a graphical client, but it will be a version of FTP that will be available *EVERYWHERE*. UNIX, Windows, Mac, they all have one that works pretty much the same way. It's a good fallback to be familiar with.

Link to comment
Share on other sites

...t's not as easy as FTP using a graphical client, but it will be a version of FTP that will be available *EVERYWHERE*. UNIX, Windows, Mac, they all have one that works pretty much the same way. It's a good fallback to be familiar with.

thants the reason i'm trying to get the hag of it :D

+ i can use it @school (it aint blocked)

What about if the directory has tons of files? Is their a command to delete everything rather than each file indevidually.

well i guess u could try making a ftp script ...

to point back to the link darren gave me earlyer this thread :

http://www.ss64.com/nt/ftp.html

it gives a example :

An example FTP Script to retrieve files in binary and ascii mode

::GetFiles.ftp

[user_id]

[ftp_password]

binary

get /usr/file1.exe

get file2.html

mget *.jpeg

ascii

mget *.txt

quit

To run the above script:

FTP -s:GetFiles.ftp [hostname]

This will connect as the user:User_id with password:ftp_password

now i presume the same should work when u replace the mget command with the mdelete or delete command aswell

justa guess tho , havent tested it yet

Link to comment
Share on other sites

ROFL

on my school they block the internet connection

but i guess they only block most progs n ports

u cant surf the web with a browser or anything but when i tryed connecting to my ftp with commandline it worked , even dl ' ed some files :D

Link to comment
Share on other sites

ROFL

on my school they block the internet connection

but i guess they only block most progs n ports

u cant surf the web with a browser or anything but when i tryed connecting to my ftp with commandline it worked , even dl ' ed some files :D

Reminds me of a guy who called up to find out why his internet wasn't working in windows. Turned out that he'd been barred for non-payment, but for some reason the browser he'd written himself worked.

Link to comment
Share on other sites

Why do they have a internet connection if they don;t let any body use it?

well they do but only unlock it when a certain class needs it , like for a certain assignment ..... to prevent ppl surfing the web all the time , or useing msn , ....

btw i noticed that in the room with the best pc's in school an 21 inch screens they also have VNC installed on em :D .... 2bad i hardly never am in that room . ffs most of the time in the one with the worst pc's (that take friggin 10+ mins to fire up and crash if u attempt to run all office apps @ 1ce :P :lol:

Link to comment
Share on other sites

im having another problem

it wont seem to let me dload files with a space in the filename in commandline ....

i tryed the old way to do it in a browser (replacing space with %20) but still wont let me ....

the filename is "wrox - beginning php5, apache and mysql web development.zip" ......

ftp> get wrox - beginning php5, apache and mysql web development.zip

200 PORT command successful.

550 wrox: No such file or directory.

ftp> get wrox%20-%20beginning%20php5,%20apache%20and%20mysql%20web%20development

.zip

200 PORT command successful.

550 wrox%20-%20beginning%20php5,%20apache%20and%20mysql%20web%20development.zip:

No such file or directory.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...