ftp a file from remote pc of win 2000


 
Thread Tools Search this Thread
Top Forums Programming ftp a file from remote pc of win 2000
# 1  
Old 10-07-2001
ftp a file from remote pc of win 2000

Hello.
I am programming in C on HP-UNIX system,i want ftp a file from remote pc which is window 2000 system,i donot how config my HP-UNIX and pc, i donot how program in C or in shell.

Thank you for help.
# 2  
Old 10-07-2001
Question ftp'ing ?

Hi bdyjm

OK, this is what I asume your trying to do:

You want to ftp to a computer running Windows 2000?

Well, what the OS that the remote host is runing isn't that important, but I guess you just wanted to give as much information about your situation as possible. Anyway...

To ftp to a remote system in unix you'd use the program "ftp".

Type "ftp" at the prompt. You'll then get a prompt looking like this:

ftp>

Then type "o" now your given a new prompt that should look something like:

(to)

here you'll enter the IP or host of the computer that you want to reach (that is running an ftpd (ftp server)). After that your promtped for the login name and password. If the server is an anonymous one the simply type "anonymous" as the login name. After that use your email address as the password.

Here is an example:

[odinwolph@fox odinwolph]$ ftp
ftp> o
(to) ftp.freebsd.org
Connected to ftp.freebsd.org (62.243.72.50).
220 ftp.beastie.tdk.net FTP server (Version 6.00LS) ready.
Name (ftp.freebsd.orgSmiliedinwolph): anonymous
331 Guest login ok, send your email address as password.
Password:
230- The FreeBSD mirror at Tele Danmark Internet.
230-
230- Contact: beastie@tdk.net
230-
230- Use wisely.
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

After that, you should be logged in. To get a file use "get file-name". If the file has spaces in it you would use "get some\ file\ name". If you will need more commands then these, then I sugest you use "help".

I hope this helps.


OdinWolph
# 3  
Old 10-07-2001
usage of ftp in C program

thank you of your help

my application system is :

windows 2000 pc --- HP unix minicom ---- windows NT

I am programming with C language on HP unix minicom , I want to get files with ftp command from windows 2000 pc to HP unix minicom in my program, and also put files with ftp command from HP unix minicom to windows NT in my program.
not into command prompt .

hope for your help
# 4  
Old 10-08-2001
I think you should write a small script which can connect to a remote machine and do all the file transfers that u wanna do.
Change it mode to make it executable ( i prefer chmod 755 filename)

Then in your C program, add the header file Stdlib.h and execute the script file from your C code using the function:
system(script_filename);

This approach will also give you the flexibility to even change the files u wanna transfer by just changing filename in your scriptfile without having to make any changes to your C code.

Good luck then......
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Remote FTP Backup -Tar archive+ encrypt+ split to a remote ftp

I have a huge directoy(200+ gb) for backup. I want upload the tar file(split files) simultaneous to a remote ftp. (pipeline, stdout, stdin etc.) I don't want write a data to local hdd. I have a ssd hdd. thanks. this code doesn't work.( yes i know the problem is split command!) tar cvzf -... (8 Replies)
Discussion started by: tara123
8 Replies

2. Shell Programming and Scripting

FTP file from win to UNIX

hi all, i hv written the script for file transfer when i am trying to transfer the file on windows machine only same desktop from one location to another location that is working fine but when i am trying to transfer the same to unix server it is going in infinte loop and file is also not getting... (5 Replies)
Discussion started by: ripudaman.singh
5 Replies

3. UNIX for Dummies Questions & Answers

Remote access from Windows 2000 into Solaris 8

All, I am looking for the easiest solution that will let me remote access from a Windows 2000 client into a Solaris 8 server. Any suggestions? Thanks Kevin (3 Replies)
Discussion started by: Kevin1166
3 Replies

4. UNIX for Dummies Questions & Answers

To ftp file on a remote server

I want to send some files in .gz format from my desktop to a remote server. What will be the procedure for that thanks (5 Replies)
Discussion started by: supercops
5 Replies

5. HP-UX

S-FTP HP-UX to Bitvise (Win NT)

Trying to connect to an HP-UX machine using public key authentication - using User keypair manager to create a keypair - export the public key to a file - tried both OpenSSH and SSH2 - and then transfer the public key to the $HOME/.ssh/authorized_keys file on the Unix box - but when I try to... (0 Replies)
Discussion started by: cvanvak
0 Replies

6. UNIX for Dummies Questions & Answers

Freebsd and win 2000 working 2gether?

Hi Brothers, Please, I've just purchased a new PC and I would like to have both win 2000 and freebsd in the same hard drive, ( 40GB and 128Mb ) can you please help how to set up my new hard drive , please! Thank you..... aka Polymorphous (2 Replies)
Discussion started by: Polymorphous
2 Replies

7. UNIX for Dummies Questions & Answers

Remote execute a file via ftp

How can I execute a script on a unix server via ftp from a Windows machine?? Can't use cron/at to schedule the execution and don't want to open up a telnet session just to do it. I want to be able to kick it off after I send the script over on a nightly basis. Reason is script parameter changes... (4 Replies)
Discussion started by: giannicello
4 Replies

8. UNIX for Dummies Questions & Answers

Using Samba to join a win 2000 Domain

I am trying to set samba up to join my windows 2000 domain and I am having troubles If anyone if familiar with this help would be greatly appreciated I issue the following command # ./smbpasswd -j DOMAIN -r DOMAINCONTROLER And the following gets returned load_client_codepage: filename... (4 Replies)
Discussion started by: gennaro
4 Replies

9. Windows & DOS: Issues & Discussions

win 2000

Dear user sorry if the subject is not for that fourm .. but I get mad .. I wana solve that problem.. I started my new semster .. and last semster.. and there I use the net under a very huge list of restriction .. no msn massenger .. no yahoo massenger .. no underground site .. no fourms (I am ... (2 Replies)
Discussion started by: RuDe_BuT_CoOoL
2 Replies

10. Cybersecurity

Remote shell with Win 2000

I need to use the RSH command to run a shell script on my Unix box from Win 2000. I'm using the etc/hosts.equiv file for configuring Unix. In it I have the hostname and username as required. As a test, I enter the following on the Win 2000 dos command: rsh servername -l username df -k. The... (8 Replies)
Discussion started by: ebergh
8 Replies
Login or Register to Ask a Question