ftp and crontab


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ftp and crontab
# 8  
Old 06-03-2006
thank you arunkumar: so this script will ftp from unix machine to my c drive?
# 9  
Old 06-03-2006
Nope no luck

#!/bin/sh
cd /home/user
ftp -n localhost <<!
quote user user
quote pass mypassword
binary
lcd C:\TEST
put ftptest.txt
quit
!

./tst.sh
ftp: local: C:TEST: No such file or directory

BUT C:\TEST directory exist on my c drive.. i set the permissions and then tried.

./tst.sh
ftp: local: C:TEST: No such file or directory
# 10  
Old 06-06-2006
Hi, can anyone help me pls, i still have no luck
# 11  
Old 06-07-2006
Hi.
I think you should do:
cd C:\TEST
instead of
lcd C:\TEST
Assuming you are running the script on an unix box and the remote is windows.
You could also use $HOME/.netrc
if you do not want to put your usr/pwd in the script. Although I would use ssh with certificates...
Regards.
# 12  
Old 06-07-2006
thx grial, i've changed lcd C:\TEST to cd C:\TEST but still i get
C:TEST: No such file or directory. But C:\TEST does exist on my c drive.
# 13  
Old 06-08-2006
Are you really using this?:
Quote:
#!/bin/sh
cd /home/user
ftp -n localhost <<!
quote user user
quote pass mypassword
binary
cd C:\TEST
put ftptest.txt
quit
!
In that case, are you using "localhost" as the destination server? If so, it should be your Windows' IP/name... I mean if you want to ftp from Linux to Windows, you are ftp-ing to yourself (linux)... I think the script is fine...
# 14  
Old 06-08-2006
hi ..

There are several quertions from my side
#!/bin/sh
cd /home/user
ftp -n localhost <<!
quote user user
quote pass mypassword
binary
cd C:\TEST
put ftptest.txt
quit
!

here in the script what is localhost.... are you trying to transer file to the local host...I cant get that....UNIX to UNIX

no CD will not work i thind so since lcd "Local CUrrent Directory"...Give the ipaddress in the place of local host amd try it....
chmod 777 ftptest.txt in unix machine....
try with all these and let me know....

Thanks,
Arun.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

FTP log only shows FTP LOGIN FROM entry?

OS: Solaris 9 Configuration /etc/syslog.conf daemon.debug /etc/inetd.conf ftp stream tcp6 nowait root /usr/sbin/in.ftpd in.ftpd -A -l -d Found the ftp.log only generate those entries from other servers/hosts. Can we trace on all ftp entries either from/to the server? ... (6 Replies)
Discussion started by: KhawHL
6 Replies

2. HP-UX

[Solved] Unable to rename file in ftp server .Net:FTP perl

Hello All, I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir. rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed. Can some body help me to... (2 Replies)
Discussion started by: krsnadasa
2 Replies

3. AIX

ftp connect in passive mode , ftp settings

how to connect to ftp server in passive mode? ftp server.abc and how can i see ftp settings, doesn't exist some ftpd.conf there is some other file where i check the options and configurations of ftp server? Thanks (3 Replies)
Discussion started by: prpkrk
3 Replies

4. UNIX for Dummies Questions & Answers

Crontab Wget, downloading a file to a FTP

Hi there, I've got my own domain, ftp etc.. I'm using cPanel and I want to download a file periodically, every say 24 hours. I've used this command: wget -t inf http : / / www . somesite . com / webcam.jpg ftp : / / i @ MyDomain . net : Password @ ftp . MyDomain . net^no spaces... (24 Replies)
Discussion started by: zYx
24 Replies

5. Shell Programming and Scripting

Automated FTP script using .netrc to multiple FTP servers

Hi all, I'm using the following script to automated ftp files to 1 ftp servers host=192.168.0.1 /usr/bin/ftp -vi >> $bkplog 2>&1 <<ftp open $host bin cd ${directory} put $files quit ftp and the .netrc file contain machine 192.168.0.1 login abc... (4 Replies)
Discussion started by: varu0612
4 Replies

6. Shell Programming and Scripting

passing parameter to ftp script from output of another ftp

Hi, I have a ftp script which first gets all the file names and echo's the latest file. I'm using another ftp command sets to get the file name given by first ftp. The problem is the parameter is not accepted by second ftp. The error message i'm getting is > Rename Temp File calloc:ICMP... (5 Replies)
Discussion started by: ammu
5 Replies

7. UNIX for Advanced & Expert Users

Using FTP to check whether file is completely FTP... plz find the description below

Hi, We have some clients who will place huge files in to one of the remote server. And the shell script written in our local server to retrieve client files (using FTP) placed on one of the remote server of ours by clients. My question Is there any FTP command/script to check from my local... (1 Reply)
Discussion started by: nmsrao
1 Replies

8. UNIX for Advanced & Expert Users

MVS->Unix FTP : Using chmod as part of FTP.

We are transferring file from mainframes to unix, & in FTP process itself we would like to set access rights for unix machine. Has anyone used chmod command in association with site command in ftp? How it should be used? Thanks in advance. (1 Reply)
Discussion started by: videsh77
1 Replies

9. Shell Programming and Scripting

FTP script to FTP file to UNIX - Solaris

Hello, A couple of times per week, i receive emails notifications when files are available for processing. Currently i read these eamails with a java program and store the attachement on my C: drive and would now like to generate a PC script to send this file name up to UNIX-Solaris and... (3 Replies)
Discussion started by: bobk544
3 Replies

10. Answers to Frequently Asked Questions

Automate FTP / Scripting FTP Transfers

One of our most frequent questions is how to automate ftp transfers. There are several approaches. Since I'm writing this post, we will start with my favorite technique. :) In Automated FTP task I present a simple example of my ksh co-process technique. And note that later in this thread I... (0 Replies)
Discussion started by: Perderabo
0 Replies
Login or Register to Ask a Question