Here is how you can FTP a file from your windows client machine to a Unix server box.
Open the command line by going to Start > Run and type cmd.
You should see something link this:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\compshack>
Now, navigate to the location of the file you would like to FTP. Mine is located under c:\temp\
Lets type the ftp command:
You should see something like this where you will get prompted for the userid you will be login to the server with as well as the password:
Connected to database_name
220 database_name FTP server (Version x.x Tue Jul 6 21:20:07 CDT 2004) ready.
User (database_name:(none)): your_userid
331 Password required for your_userid.
Password:
230 User your_userid logged in.
Issue the command below to check the default login location for this server:
and you should see something like this:
257 "/incoming/files" is current directory.
If this is not the directory you would want to FTP the file to then issue a CD command to get to the desired directory:
ftp> cd /temp/files
250 CWD command successful.
ftp> pwd
257 "/temp/files" is current directory.
It looks like we are all set, lets FTP a file called my_file from c:\temp to /temp/files.
note: you would use the put command to ftp the file, and the put command allows to change the file name on the fly. So, in my example I'm changing the file name from my_file to test_ftp.txt
ftp> put my_file.txt test_ftp.txt
200 PORT command successful.
150 Opening data connection for test_ftp.txt.
226 Transfer complete.
ftp: 5151 bytes sent in 0.01Seconds 515.10Kbytes/sec.
ftp> bye
221 Goodbye.
C:\temp>
Bookmark/Search this post with
Comments
Hi,
this did not work for me
ftp> cd /temp/files
250 CWD command successful.
ftp> pwd
257 "/temp/files" is current directory.
till this place everything seemed to be fine
then when i executed
ftp> put test2.txt test1.txt
200 PORT COMMAND SUCCESSFUL
553 test1.txt permissions denied
Please advice
Thanks In Advance
Hi ksuchetan,
2 things that might cause your "permission denied" error.
1. You don't have permission to create files into /temp/files directory or,
2. test1.txt file is already in /temp/files directory and you don't have permissions to overwrite it.
Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog
Thats correct
How to automate the above process
Is there a way we can directly change the file permission while placing it to server.
Hi KSUCHETAN,
This I think is because your user ID doesnt have the permissions for transferring into the location you are trying to. Kindly check the permissions for writting and then FTP, this will most probably allow you to transfer without any errors.
Thanks and Regards,
Ankit Kaushik.