RE: ftp script

RE: ftp script

 

  

Sorry for the delay. Internal problem.

Yes. This is similiar to what I was going to post.
But I was testing it out because I'm accustomed to
transfering from dos to unix (not unix to dos).

But I get

ftp> open mymachine
username/password prompts
ftp> put xx.sql
200 PORT command successful
550 xx.sql: Access is Denied

???
The permissions on xx.sql are -rw-r--r--
And I'm logged in as root anyway.
???

I'm not real handy with windows/dos.
But obviously I'm missing something here.

And

rcp xx.sql mymachine:\junk

mymachine refues the connection.



-----Original Message-----
From: Shergill Gurmohan
[mailto:oracledba-ezmlmshield-x36083019.[Email address protected]
Sent: Wednesday, May 25, 2005 12:14 PM
To: LazyDBA Discussion
Subject: RE: ftp script

Try using this:

#!/sbin/sh
cd [foldername]
read [varname]
ftp -v [servername] $varname <<END_SCRIPT USER [username] PASS
[password] binary cd [foldername] put [filename] quit END_SCRIPT

The values in brackets are to be replaced with your own values. Remove
the brackets. I have used this script for sending the file over non
interactively. For your purpose I have added the first two lines as you
wanted it to ask for the file name and I am trying to send the entered
variable name in ftp program by passing it as an argument to ftp
command. I am not sure if it would work fool-proof but you can try it.
Hope it helps.

Gurmohan
www.onlymath.com

------------------------------------------------------------------------
---------------------------

-----Original Message-----
From: Inder Singh
[mailto:oracledba-ezmlmshield-x22143053.[Email address protected]
Sent: Wednesday, May 25, 2005 1:59 PM
To: LazyDBA Discussion
Subject: ftp script


All,

Does anybody has a ftp script which ftp's file from unix to pc? Is it
possible that I can pass parameter in that script. What I am looking
for is when I run the ftp script it should ask for a file name which is
concurrent output file and then transfer the file from unix to local PC.

Regards,
Inder


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com To unsubscribe:
see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com By using this list you agree
to these terms:http://www.lazydba.com/legal.html


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html



--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

Douglas County, Oregon
www.co.douglas.or.us


Oracle LazyDBA home page