Hi
Through shell script we put a file on remote sever.
After putting file on that server it goes into inbox folder and it appends a hash code to file name. So when getting back the same file from inbox folder it is giving me following error.

/inbox/TESTFILE*: No such file or directory.

Here is my script

#!/bin/sh
FTP_USER='abhay'
FTP_PASS='amp123'
FILE_NAME="TESTFILE"
/usr/kerberos/bin/ftp -vni 192.168.1.322 <<EOC
user $FTP_USER $FTP_PASS
put $FILE_NAME
cd inbox
mget TESTFILE*
quit
bye
EOC

So please help me regarding this.

Thanks
Abhay

Could you give use an example of what the filename looks like after its been modified.

Hi
Through shell script we put a file on remote sever.
After putting file on that server it goes into inbox folder and it appends a hash code to file name. So when getting back the same file from inbox folder it is giving me following error.

/inbox/TESTFILE*: No such file or directory.

Here is my script

#!/bin/sh
FTP_USER='abhay'
FTP_PASS='amp123'
FILE_NAME="TESTFILE"
/usr/kerberos/bin/ftp -vni 192.168.1.322 <<EOC
user $FTP_USER $FTP_PASS
put $FILE_NAME
cd inbox
mget TESTFILE*
quit
bye
EOC

So please help me regarding this.

Thanks
Abhay

What's the remote `pwd' when you copy the local file `$FILE_NAME' into it? It can not be `inbox' because you `cd' to it after the fact.

Could you give use an example of what the filename looks like after its been modified.

File name will be like

TESTFILE#P129GDN1326S43

when we put file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.