Operating System - HP-UX
1832978 Members
3154 Online
110048 Solutions
New Discussion

Cannot ftp files with file name embedded with special characters

 
Rita Li
Frequent Advisor

Cannot ftp files with file name embedded with special characters

Hi All,

My system is with HP UX-11.0. I have some CAD files copied to this system from another IBM AIX system running a CAD application, the file names are sort of weird but do carry some meaning
eg.
VP870±GEAR±CHAIN±UPDATE±29052000.model VP±CHARGER±RAY±20001215.model

ie. the file names give the file directory structure as well

These files are appended some more info from the HP system then letting users to 'ftp get' the files to Windows (XP, WinXP, Win2K etc.) But so far no ftp application is able to perform the get or mget successfully (tried DOS ftp, WS ftp, netterm's ftp)

the HP's /var/adm/syslog/syslog.log is not showing any error :

Oct 6 14:34:50 bdcimfg2 ftpd[6928]: FTP LOGIN FROM 10.0.18.254 [10.0.18.254], ritali
Oct 6 14:37:09 bdcimfg2 ftpd[6928]: FTP session closed

but the Windows ftp is giving error as :

RETR VP870±GEAR±CHAIN±UPDATE±29052000.model
150 Opening BINARY mode data connection for VP870±GEAR±CHAIN±UPDATE±29052000.model(717440 bytes).
! Failed to open file VP870±GEAR±CHAIN±UPDATE±29052000.model (0)
! File error on WRITE! Transfer cancelled.
Received 0 bytes in 0.1 secs, (0.00 bps), transfer failed
426 Transfer aborted. Data connection closed.
226 Abort successful

Thanks in advance for any h
14 REPLIES 14
Mark Grant
Honored Contributor

Re: Cannot ftp files with file name embedded with special characters

If you can't get this to work, i.e enclosing the filename in ' marks doesn't work then I would consider a script to rename all the files and keep a record of the real names in another file. Then ftp all your files across with their new names and the file containing the real names. On the other machine have a script read through the file of real names and re-name all the files back to how they were.

It isn't elegant but maybe it's a workaround.
Never preceed any demonstration with anything more predictive than "watch this"
Graham Cameron_1
Honored Contributor

Re: Cannot ftp files with file name embedded with special characters

That you have copied the files from AIX to HP-UX indicates that this is now a unix problem.
Further, the lack of any diagnostic in syslog.log confirms that the HP box is happily sending the files but the Windoze box cannot create files with these characters in the name - I suspect the wierd à characters are confounding it, the rest of the file name looks ok.
Short of posting a message to one of the M$ forums, I think your only choice is to do as Mark suggests, and rename either before, or during the copy.
You can do the latter using ftp get syntax:
get remote-file [local-file]

--Graha
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Graham Cameron_1
Honored Contributor

Re: Cannot ftp files with file name embedded with special characters

Oops - typo. For "now a unix problem" read "NOT a unix problem. Sorry!
-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Zigor Buruaga
Esteemed Contributor

Re: Cannot ftp files with file name embedded with special characters

Hi,

Other option is to use "tar" command to group before all files in one single file ( with normal name ) and then use ftp.
In the other side, use Winzip to extract all the files ( and see if the problem still persists with the original file names ).

Or try using "rename" command in the ftp prompt before using "get".

HTH
Kind regards,
Zigor

Bhuvaneswari Selvaraj
Valued Contributor

Re: Cannot ftp files with file name embedded with special characters

Hi,

Looks like windows does not recognise those names. Try getting them in a different name
ftp> get VP870à ±GEARà ±CHAINà ±UPDATEà ±29052000.model test.model

You cant do a bulk get using mget * as those names are not valid in windows, you have to get only indiivdual files and store them in a differ
Bhuvaneswari Selvaraj
Valued Contributor

Re: Cannot ftp files with file name embedded with special characters

Hi,

Looks like windows does not recognise those names. Try getting them in a different name
ftp> get VP870à ±GEARà ±CHAINà ±UPDATEà ±29052000.model test.model

You cant do a bulk get using mget * as those names are not valid in windows, you have to get only indiivdual files and store them in a differ
Keith Bevan_1
Trusted Contributor

Re: Cannot ftp files with file name embedded with special characters

Rita,

Easiest and simplest way to get round the problem is to use mput and/or mget.

If you do not have too many files called vp* then try mput vp* or mget vp* and respond with y or n when prompted in interactive mode.

Keith
You are either part of the solution or part of the problem
Keith Bevan_1
Trusted Contributor

Re: Cannot ftp files with file name embedded with special characters

Rita,

If my previous posting does not work due to filename and filename length restrictions in windows then you may have to try copying/moving the source file to another name before using ftp.

ie

cp VP870à ±GEARà ±CHAINà ±UPDATEà ±29052000.model
vp870.model

Then under windows create the directory structure required :-

\VP870\GEAR\CHAIN\UPDATE

Then use ftp to get or put the file into this d
You are either part of the solution or part of the problem
Keith Bevan_1
Trusted Contributor

Re: Cannot ftp files with file name embedded with special characters

Rita,

Looks like my previous posting got cut short in transit.

The last line should read :-

Then use ftp to get or put the file into this dirctory.

Keith
You are either part of the solution or part of the problem
Bill Hassell
Honored Contributor

Re: Cannot ftp files with file name embedded with special characters

I would recommend changing the rules for file names so these special characetrs are never used. One of the most incompatible features of multiple operating systems are special characters. One opsystem allows certain characters, another does not. The zspecial characters you have in the filernames look like international language charcaters and these will definitely have problems as other opsystems ignore the 8th bit. This isn't an ftp problem, it is a basic opsystem incompatibility. Stick to A-Z and 0-9 for filenames. Note that filename lentgth may become an issue on some systems.


Bill Hassell, sysadmin
Rita Li
Frequent Advisor

Re: Cannot ftp files with file name embedded with special characters

Bill,
There is no international characters contained within the file name, the weird characters got in after I copy/paste the file names over here. The file names should read
"VP870",then the +/- sign,then "GEAR", then the +/- sign, then "CHAIN", then the +/- sign, then "UPDATE", then the +/- sign, then "29052000.model"
The very basic requirement is :
1. File name must be reserved
2. Users will ftp download the file to their desktops for further modify it, then ftp upload the file to the server for sharing the file with others

I also note that for this scenrio, only ~10% of work can be done with HP-UX & 90% of work must be done from MS. Still, I need to thank everyone who has contributed their thoughts...
Rajeev  Shukla
Honored Contributor

Re: Cannot ftp files with file name embedded with special characters

Hi Rita,

Have you tried ftp'ing the file with embeded in double quotes "VP870à ±GEARà ±CHAINà ±UPDATEà ±2
Rita Li
Frequent Advisor

Re: Cannot ftp files with file name embedded with special characters

Rajeev,
Find no way to type in the +/- sign, so can't do ftp get (a specific file & put quotes before & after the file name) but only mget VP*. Result is ftp returns with error message "!Failed to open file VP870à ±GEARà ±CHAINà ±UPDATEà ±29052000.model (0)
! File error on WRITE! Trans
Bill Hassell
Honored Contributor

Re: Cannot ftp files with file name embedded with special characters

It doesn't matter whether there are international characters or simply special charcters like +=_-)(*&^%$#@!{}[]:";'|\ (and spaces, tabs)

These will always be a problem because opsytem manufacturers do not consult each other on how to be compatible. The only thing you can depend on is a-z, -_ and 0-9, with possible maximum length restrictions. I would suggest using underscore or dash, both of which are acceptable:

VP870_GEAR_CHAIN_UPDATE_29052000.model

There is no fix for incompatible filenames since this is the basic filesystem design for each opsystem.


Bill Hassell, sysadmin