Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP file from Unix to Windows

Status
Not open for further replies.

greyone

Programmer
Dec 14, 2000
200
CA
Hi Guys
i'm logged on to my unix machine thru telnet. I have created a korn shell script there and i want to ftp this to my windows directory on my local comp. Is there a way to do this.

Please help

 
Is there any reason you can't go out to a DOS box and ftp into the unix system and use get instead of put?
 
GET A DOS BOX
CD TO RELEVANT DIR
AT LOCAL PROMPT TYPE
C:\ftp <machine name>
User (mymachine): username
Password required for username:
Password: username..
CD TO YOUR SCRIPT DIR
LIST DIR TO CONFIRM
Ls
TYPE THE FOLLOWING AT THE FTP PROMPT TO GET SINGLE FILE
TYPE MGET FOR MULTI FILES
ftp>bin (for binary mode)
ftp>hash (prints a hash whilst transferring)
ftp>get scriptname
WHEN TRANSFER IS COMPLETE TYPE BYE TO EXIT
THE FILE(S) ARE NOW ON YOUR LOCAL MACHINE
ftp>bye
 
What about if I need to ftp the script from Dos to Unix? What kind of command should be used and how to go to the dos directory? Thanks.
 
Easy, instead of using the &quot;get&quot; command
use the &quot;put&quot; command. To ftp multi files
use mput.
To get to any dir in UNIX or DOS just use the cd command.
I hope this explains things.
 

To transfer the file from dos to unix follow sirrom's excellent directions but instead of &quot;get scriptname&quot;, enter &quot;put scriptname&quot;.

To get to the dos directory e.g. c:\lweng\files, to get the file from or put the file to, enter:

c:
cd \lweng\files

CaKiwi
 
In ftp> if I am under the directory /u04/ on unix since I typed cd /u04, and I want go back to Dos directory, I typed cd c: and it won't take it. How can I go back to dos directory under ftp> and check which file I have? Thanks.
 
Try lcd c:
lcd asks ftp to change the 'local' directory, ie the one on the machine you're telnetting from.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top