• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 964
  • Last Modified:

FTP Error (HP Unix 11)

Hi Experts,

Following script is giving error "553 Could not determine cwdir: No such file or directory." :

{

echo "cd testdlvry"
echo "mput /folder1/hold/TT*"

} | ftp -vi 122.20.39.51


while following is running perfectly:

{

echo "cd testdlvry"
echo "put /folder1/hold/TT1 /folder2/tmp/TT1"

}|ftp -vi 122.20.39.51


Any hint for solution?

Thanks.
0
myrizvi
Asked:
myrizvi
  • 2
  • 2
1 Solution
 
gheistCommented:
Do ftp> lcd /folder1/hold
and from there do an mput.
0
 
myrizviAuthor Commented:
Hi gheist,

This lcd command is not working on HP UX.

I want to have script to "put" multiple files to remote server in one execution. Right now my script is doing it in a loop and using only "put" command to send files one by one (as mentioned above in second example). I want to use the unix ftp tool not any other 3rd party tool.
0
 
gheistCommented:
Your firs script puts files
"/folder1/hold/TT*"
into remote "/folder1/hold/TT*"

Assuming directories are created.

instead of ftp> lcd ; then cd to needed directory and do the put after.


0
 
myrizviAuthor Commented:
Thanks Ghiest, enjoy the earned points.

The script now looks like this and working fine:

{

echo "cd testdlvry"
echo "lcd /folder1/hold"
echo "mput TT*"

} | ftp -vi 122.20.39.51
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now