Re: Renaming files in lower case (575 Views)
Reply
Regular Advisor
smsc_1
Posts: 87
Registered: ‎11-19-2007
Message 1 of 6 (751 Views)
Accepted Solution

Renaming files in lower case

[ Edited ]

 

Dear community,

I have a script in queue that send log files from OpenVMS 8.3 to Linux Red hat server.

On Red Hat there is an application that expect the filename as XXXXXXX.DAT.gz (.gz must be in lower case).

 

This is part of the transfer script:

$ FTP 10.99.10.10 /USERNAME="user" /PASSWORD="password"
SET TYPE BINARY
PUT   LOG_FILE.8755-GZ;1   LOG_FILE.8755.FTP
RENAME   LOG_FILE.8755.FTP   LOG_FILE.8755.DAT.gz
EXIT

 

The problem is OpenVMS always rename the file in UPPER case, so I have always this result:

LOG_FILE.8755.DAT.GZ

Linux application behaviour cannot be changes since it's hard coded, so, is there a way to rename the .gz extension in lower case? Or at least all the file name in lower case?

 

Thanks

Lucas

 

./ Lucas
Honored Contributor
Andy Bustamante
Posts: 975
Registered: ‎10-24-2003
Message 2 of 6 (719 Views)

Re: Renaming files in lower case

 

I suggest you try either:

  RENAME   LOG_FILE.8755.FTP   "LOG_FILE.8755.DAT.gz"

 

or prior to execution of the FTP command

  $ set proc/parse=extended 

 

 

If you don't have time to do it right, when will you have time to do it over? Reach me at first_name + "." + last_name at sysmanager net
Honored Contributor
Steven Schweda
Posts: 9,091
Registered: ‎02-23-2005
Message 3 of 6 (702 Views)

Re: Renaming files in lower case

Honored Contributor
Steven Schweda
Posts: 9,091
Registered: ‎02-23-2005
Message 4 of 6 (698 Views)

Re: Renaming files in lower case

Regular Advisor
smsc_1
Posts: 87
Registered: ‎11-19-2007
Message 5 of 6 (651 Views)

Re: Renaming files in lower case

 

Thanks Andy,

RENAME   LOG_FILE.8755.FTP   "LOG_FILE.8755.DAT.gz"  (with quotas) works perfect! ;)

Instead, this "$ set proc/parse=extended " does not work for me!

 

Steven, I have to rename first in .FTP because I have routine that check if the files are corrently trasferring. So if the file remains .FTP means something goes wrong during transfer.

 

./ Lucas
Honored Contributor
The Brit
Posts: 1,291
Registered: ‎06-18-2007
Message 6 of 6 (575 Views)

Re: Renaming files in lower case

Thanks Steven.

 

Your response to the above question pointed me to the solution to a related problem of my own.

 

Dave.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.