Operating System - OpenVMS
Showing results for 
Search instead for 
Did you mean: 

deleting openvms style filenames from HP-UX system

Frequent Advisor

deleting openvms style filenames from HP-UX system

Good morning, 


I was wondering whether anyone could assist me with the following issue.  I FTP'd some scripts from HP-UX onto a VMS server (so that I could edit them using preferred edit/tpu in place of VI ). After making the modifications, I then ftp'd the files back from VMS onto hp-ux server using FTP (from the HP__UX server_

 The files came across (but with the  original directory names embeeded in the filename ), which I hadn't allowed for !!  Could someone please advise me of the command  I  need to run in order to delete these files from the HP-UX server ?  (I'm assuming I could have avoided the issue below, had I copied the files indirectly between hp-ux to windows to VMS rather than copy then copying them directly between the 2 different operating systems) ? 





Honored Contributor

Re: deleting openvms style filenames from HP-UX system

Good afternoon,

you probably want to ask this in the HP-UX forum, as this is not a VMS problem. Anyway, I assume you have to quote the filename (or at least some characters) so that your shell doesn't interpret the metacharacters. For a shell like bash


should do.

Maybe transfering files via windows works for you, but I would not recommend doing that. I would rather try to find out how to specify the source and destination file in the commands put and get of your ftp client so that you can leave out the directory and version part of the VMS filename on the HP-UX side.

Honored Contributor

Re: deleting openvms style filenames from HP-UX system

Quoting often works, but may need additional escapes.

My preference in these situations, be it HP-UX, Linux or Windows having received an 'odd' (= real!) file name is to use wildcards.

Just replace the brackets, dots, semicolons with a * (star) and delete or rename.



Honored Contributor

Re: deleting openvms style filenames from HP-UX system

Not sure why you think this is an OpenVMS issue.   It's not.  This is entirely HP-UX.

With ksh, bash and various other Unix shells, quoting the filename string will allow the file to be renamed, deleted or copied.   (This quoting and backslash escaping are very common on OS X and other systems that will commonly have filenames containing spaces, too.)

If you're not quoting your strings in your shell scripts, then you're headed for trouble, too: details on common bash pitfalls.  Most shells have similar recommendations.

Be very careful to differentiate which quote characters are used in a partiuclar context, too.  ` and ' and " and such are different.  Sometimes cut-and-paste or text- or grammar-correcting tools can alter the chosen character, too. 

And FWIW, file transfers involving OpenVMS-format sequential files aren't always easily transportable, either — not that I'd involve Windows here, either — nor are binary files necessarily transferable,


Frequent Advisor

Re: deleting openvms style filenames from HP-UX system


Many thanks for yourfeedback. Your solution to substitute wildcards in place of semi-colons, brackets etc worked fine. I made the mistake of including the full VMS directory name in the Ftp get filename statement (forgetting that HP-UX would embed the directory within the filename) when the filename got ftp'd across! Apoplogies for posting on this forum instead of the HP-UX one (in my defence my background is VMS rather than Unix ! ).


Kind regards