Page 1 of 1
fttp script
Posted: Thu Nov 16, 2006 3:53 pm
by sainath
Hi
I wrote a following script to move a file to a remote location.i want to move all the files like TD_ORD_SDAO* from local to remote location.
but it is giving error
SH: mput: not found.
`cd #LocalPath#ETL_FINALIZEDPROPOSAL/; echo 'user #UserName# #PasswordName#\n cd #RemotePath#\n mput #RemoteFileName#' | ftp -n #ServerName#`
please share your thoughts
thks
Posted: Thu Nov 16, 2006 4:04 pm
by ArndW
my thoughts are that mput is not in your path
ftp script
Posted: Thu Nov 16, 2006 4:09 pm
by sainath
Hi
mput is there in my code before REmoteFIleName.
how can i mention to move all the files in local location to remote loation
`cd #LocalPath#ETL_FINALIZEDPROPOSAL/; echo 'user #UserName# #PasswordName#\n cd #RemotePath#\n mput #RemoteFileName#' | ftp -n #ServerName#`
thks
Posted: Thu Nov 16, 2006 4:12 pm
by narasimha
Just to make, which os are you on?
Check if you have mput is in your path.
If unix, type this on your prompt and see what response you get
Posted: Thu Nov 16, 2006 4:17 pm
by chulett
Why would
mput need to be in anyone's path?
It's an
ftp command and needs to be executed
inside your ftp session, not outside of it as you have it now. And that requires a little 'here document' action.
![Wink :wink:](./images/smilies/icon_wink.gif)
Posted: Thu Nov 16, 2006 4:37 pm
by sainath
hi
Can you explain it more in detail where i have to modify the fttp script
thks
Posted: Thu Nov 16, 2006 4:46 pm
by chulett
Google for something like 'here document ftp script' and you should find lots of examples of what is meant by that.
One such example.