SFTP from remote server

Hi All,While sftp from remote server an error (/) is coming before the file in a script.Please find the below log. The file is on home directory on remote server.

[sftp> get datafile_18OCT2015_* /apps/trav/home/File "/datafile_18OCT2015_*" not found.+ RC=1]

The error msg doesn't seem to indicate it's operating on "home" directory, but rather on the root dir. What's the output of the pwd Display remote working directory. command?

From command prompt it is working fine, but from script it is throwing error as

/datafile_18OCT2015_*  not found.sftp> pwdRemote working directory: /sftp> ls

Please use code tags as required by forum rules!

Looks like the working directory is / . (would be clearer had you used tags!) Is there a file "datafile_..." in / ?

Yes found the issue with case sensitivity. 18OCT2015

I am using the code to get the date month and year

TS=`date +%d%b%Y | tr '[a-z]' '[A-Z]' `

Can you please help me how to get data as 18Oct2015

Don't pipe through tr . "Oct" is the normal date output; above tr converts every char to upper.

Thanks got it...