FTP USING MS-DOS

You can use the command prompt (MS-DOS) to upload files into the FTP server. The example below shows you how to upload using MS-DOS if you are a personal Sabah.Net account user (under sabah.net.my ). The steps can be applied to other types of account with minor adjustments to be done where necessary.

Please keep your Data and Application Hosting Confirmation Letter with you handy, since you will need to refer to it from time to time when using this guide. In the Webhosting Confirmation letter, you should have some essential information. For example, a Sabah.Net personal user called Test Ting received a confirmation letter from K.K.I.P. Communications Sdn. Bhd. with the following information:
 

Membership number
: PS1234567
User ID (User Name)
: test
Password
: test007
FTP

: www.sabah.net.my

(Users please note your FTP address:
for sabah.net.my, use www.sabah.net.my;
for sabah.gov.my, use www.sabah.gov.my;
for sabah.edu.my, use www.sabah.edu.my;
for sabah.com.my, use www.sabah.com.my;
for sabah.org.my, use www.sabah.org.my)

 

URL
: http://www.sabah.net.my/testing
(testing is the URL prefix you requested
when you applied for this service. The URL
domain should be similar to the domain on
your e-mail address.)

1.0 Accessing the FTP server

  1. In your Windows computer, go to Start | Programs | MS-DOS Prompt.
  2. In the MS-DOS window, type in as follows:
    ftp www.sabah.net.my
  3. Hit the Enter key.
  4. Type in your Sabah.Net user ID.
  5. Hit the Enter key. If you see a "230 User <your Sabah.Net user ID> logged in" status, you are successfully logged in and can start transferring your files and directories.

2.0 Settings to transfer documents into the FTP server

Change your local directory to be where your files are to upload your pages directly from your own personal computer. <your web page document location> is the path of your FTP file in your computer.
  1. In the prompt, type the following:
    ftp>   lcd c:\< your web page document location>
    If you see a "Local directory now C:\<your web page document location>" status, you have successfully changed the location of your Local System.
You need to change the transfer mode so that the documents and image files will be displayed properly in the FTP web site.
  1. In the prompt, type the following
    ftp>   binary
    If you see a "Type set to I" status, you have successfully changed the location of your Local System.

3.0 Listing files and directories in FTP server

In the prompt, type the following:
ftp>  ls
You will see a list of contents in your directory. For example,
index.html
mywebpage.html
folder
You will not see any list if your web site does not have any content. To find out your current working location in the FTP server, type the following in the prompt:
ftp>  pwd

4.0 Transferring files from Local System into Remote System

In the prompt, type the following:
ftp> put mypage.html
where mypage.html is the file name of your HTML document.

If you have more than one page you can use the multiple put command. In the prompt, type the following:

ftp> mput *.html
where the "mput *.html" command will transfer all files with .html extensions into the FTP server. You will be prompted for each file before it is transferred into the server. Just type "y" for each prompt. For example:
mput mypage.html? y
Repeat the steps above until all the files are transferred to the FTP server.

5.0 Moving from one directory to another

  1. To go into a directory, type the following in the prompt:
    ftp> cd folder
    The command "cd" will change the remote working directory into "folder."
  2. To move up one level, type the following in the prompt:
    ftp> cd ..
    The command "cd .." will change the remote working directory one level up.

6.0 Creating directories in the FTP server

In the prompt, type in the following:
ftp> mkdir <directory name>
where <directory name> is the name of your new directory. Only use alphanumerics (alphabets and numbers), hyphens ( - ) or underscores ( _ ) when naming your files and directories.

In the prompt, type the following:

ftp> delete mypage.html
where mypage.html is the file name of your HTML document.

If you have more than one page you can use the multiple delete command. In the prompt, type the following:

ftp> mdelete *.html
where the "mdelete *.html" command will transfer all files with .html extensions into the FTP server. You will be prompted for each file before it is transferred into the server. Just type "y" for each prompt. For example:
mdelete mypage.html? y
Repeat the steps above until all the files are transferred to the FTP server.

8.0 Deleting directories in the FTP server

You must first delete the files in the directory that you want to delete. Use the technique in "Deleting files in the FTP server" for instructions.

In the prompt, type the following:

ftp> rmdir <directory name>
where <directory name> is the directory name that you want to delete.

9.0 Logging out of the FTP server

To end your FTP session, type "bye" in the prompt.

To exit MS-DOS, type "exit" in the prompt.