- Home Page - PolyPhonic Indian Tones - PolyPhonic English Tones - Arabic Ring Tones - Pakistani Ring Tones - Indian Ring Tones - Punjabi Ring Tones - English Ring Tones - SMS to Pakistan - SMS to India - SMS to all over World - Funny SMS - Mobile Tricks - Email Tricks - Hotmail Hacking - Ip & Netstat - DOS - Window secret - Hacking Downloads - MIRC
Dos FTP Tutorial
Introduction: This is a tutorial on FTPing from the DOS command prompt in
Windows. Yes, that’s right, DOS. Ancient I know, but very effective. Especially
when your on a computer that doesn’t allow downloading of any programs such as
other, more simple FTP programs, that would make your retrieval of files from a
shell account to be a lot easier and time efficient.
I started reading up on FTPing with DOS when the computers at my school would
always mess up my diskettes for some unknown reason. So I started storing my
files on my shell account, which saved my ass a number of times mind you. So now
I’m writing this for the fun of it actually and to possibly help someone out
their put down their freeware/warez FTP program and learn a little old school
FTPing.
FTP:
FTP (File Transfer Protocol) allows you to send and receive files, through port
21, to and from your computer to a remote server. FTP may allow the sending of
one file at a time or multiple files. A large number of files may also be
compressed into a zip file and sent as one single file.
Now, to DOS FTP you must first open the DOS prompt. If you don’t know where it
is go to Start, Run, then in the space type “Command” without the quotes or you
can press Start, Programs, and find it in the list. When the MS-DOS Prompt comes
up, you should see something like this…
Microsoft(R) Windows 98
(C)Copyright Microsoft Corp 1981-1999.
C:\WINDOWS>
Ok so let’s say you want to transfer a file from your computer to a remote shell
account. Before you can start FTPing, you will have to place yourself in the
directory that your files are located. So let’s say that your files are located
in a folder called “MyFiles” in the C:\ directory. The above example shows that
you are already in the Windows directory but you want to get to the C:\
directory and then to the folder called “My Files”. No problem. You need to use
the command “cd” or change directory. So now you would type “cd C:\” to bring
you up to the C:\ directory and then “cd MyFiles” which would look like this…
Microsoft(R) Windows 98
(C)Copyright Microsoft Corp 1981-1999.
C:\WINDOWS>cd C:\
C:\>cd MyFiles
C:\MyFiles>
Now that you are in your folder “MyFiles” you can look inside the directory “C:\MyFiles”
by pressing the command “dir” for directory…
Microsoft(R) Windows 98
(C)Copyright Microsoft Corp 1981-1999.
C:\WINDOWS>cd C:\
C:\>cd MyFiles
C:\MyFiles>dir
Volume in drive C has no label
Volume Serial Number is 2B78-1BEC
Directory of C:\MyFiles
.
12-19-01 11:57p .
..
12-19-01 11:57p ..
TEXT1 TXT 10,500 12-20-01 12:06a Text1.txt
TEXT3 TXT 13,962 12-20-01 12:06a Text3.txt
TEXT4 TXT 20,886 12-20-01 12:06a Text4.txt
TEXT2 TXT 13,962 12-20-01 12:06a Text2.txt
4 file(s) 59,310 bytes
2 dir(s) 905,248,768 bytes free
C:\MyFiles>
You can now see your files and their details. Now that you have made sure that
your files are there, you are now ready to start sending them to your shell
account or remote server through FTP.
So you are now in the directory where your files are located. The first thing
you want to do now is connect to the remote server where you want your files to
be transferred to by FTP. To do this you need to type the command “ftp” then the
server address. Once prompted, enter your username and password…
C:\MyFiles>ftp arbornet.org
Connected to arbornet.org.
220-Welcome to M-Net's FTP Server
220 ProFTPD 1.2.0 Server (M-Net Ftpd) [m-net.arbornet.org]
User (arbornet.org:(none)): JohnDoe
331 Password required for JohnDoe.
Password:
230 User JohnDoe logged in.
ftp>
********Side Note************
To get a list of ftp commands you would need to type the command “help” or “?”.
To get a description of each command simply type “help” and then the command.
Example…
Commands may be abbreviated. Commands are:
! delete literal prompt send
? debug ls put status
append dir mdelete pwd trace
ascii disconnect mdir quit type
bell get mget quote user
binary glob mkdir recv verbose
bye hash mls
remotehelp
cd help mput
rename
close lcd open
rmdir
ftp> help get
get Receive file
ftp> help mdelete
mdelete Delete multiple files
ftp> help ascii
ascii Set ascii transfer type
ftp>
********************
Next, we need to type in the command “ascii” to indicate that we are sending
text files in ascii format. If you were sending files such as .exe, .jpg, .gif,
etc., you would type in the command “binary” to indicate that the files are
being transferred in binary format.
*** Remember that commands on a unix account are case sensitive, which means you
have to type them exactly how they appear. ***
To upload your files one by one to the remote server you need to issue the “put”
command. Example…
ftp> put text1.txt
200 PORT command successful.
150 Opening ASCII mode data connection for Text1.txt.
226 Transfer complete.
ftp: 10500 bytes sent in 0.28Seconds 37.50Kbytes/sec.
ftp>
To upload all the files at once you would issue the “mput” (multiple put)
command along with an “*” asterisk or wildcard along with the file extension
.txt to indicate that you only want to send files that end in .txt. Example…
ftp> mput *.txt
mput Text1.txt? y
200 PORT command successful.
150 Opening ASCII mode data connection for Text1.txt.
226 Transfer complete.
ftp: 10500 bytes sent in 0.28Seconds 37.50Kbytes/sec.
mput Text3.txt? y
200 PORT command successful.
150 Opening ASCII mode data connection for Text3.txt.
226 Transfer complete.
ftp: 13962 bytes sent in 0.33Seconds 42.31Kbytes/sec.
mput Text4.txt? y
200 PORT command successful.
150 Opening ASCII mode data connection for Text4.txt.
226 Transfer complete.
ftp: 20886 bytes sent in 0.44Seconds 47.47Kbytes/sec.
mput Text2.txt? y
200 PORT command successful.
150 Opening ASCII mode data connection for Text2.txt.
226 Transfer complete.
ftp: 13962 bytes sent in 0.28Seconds 49.86Kbytes/sec.
ftp>
*** By default, when using the “mput” command you will be asked on each file
transfer attempt if you want to transfer the file or not. The correct response
to this would be a “y” for yes and an “n” for no. If you would like the server
not to ask you this, simply enter the command “prompt” without the quotes of
course, before you issue the “mput .txt” command. ***
If you wish to see if your files were transferred to your account you would type
the command “dir” or the “ls” (list) command. Example…
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
drwx------ 2 JohnDoe guest 512 Oct 18 09:52 Mail
-rw-r--r-- 1 JohnDoe guest 10422 Dec 20 11:28 Text1.txt
-rw-r--r-- 1 JohnDoe guest 13860 Dec 20 11:28 Text2.txt
-rw-r--r-- 1 JohnDoe guest 13860 Dec 20 11:28 Text3.txt
-rw-r--r-- 1 JohnDoe guest 20736 Dec 20 11:28 Text4.txt
226 Transfer complete.
ftp: 325 bytes received in 0.06Seconds 5.42Kbytes/sec.
ftp>
As you can see, all the files are now placed onto your remote account.
If you wanted to put a file back onto your computer you would issue the command
“get Text1.txt” and it would be transferred back to your computer. To put them
all back onto your computer you would issue the command “mget *.txt” (multiple
get).
Deleting the files is just as easy as transferring them. All you have to do is
look on your list to see which file you want to delete and type the command
“delete Text1.txt”…
ftp> delete Text1.txt
250 DELE command successful.
ftp>
To delete all the files from the directory you simply type the command “mdelete
*.txt”. If you want, you should make sure interactive mode is turned on by
pressing the “prompt” command to ask if you would like to delete the files or
not. This will help prevent you from deleting a wanted or important file by
accident. Example…
ftp>prompt
Interactive mode Off .
ftp>prompt
Interactive mode On .
ftp> mdelete *.txt
200 Type set to A.
mdelete Text1.txt? y
250 DELE command successful.
mdelete Text2.txt? y
250 DELE command successful.
mdelete Text3.txt? y
250 DELE command successful.
mdelete Text4.txt? y
250 DELE command successful.
ftp>
Some accounts allow you to edit your files on a website. You can do this by
opening your browser and typing in the url, for example, ftp://www.arbornet.org/.
You would basically be allowed to edit your files in the same way you would if
you were in the Windows Explorer. I find that this way is much more convienient
than doing it in DOS but its always handy to learn something new. Well I hope
you learned something and thanks for reading.