Error 52: Bad File Name (Chinese characters)

  • Thread starter Thread starter Craig
  • Start date Start date
This has been resolved via Tom's suggestion (thanks again).

I had to jerry-rig the code a bit, though, as Tom's code (utilizing the AscW
function) worked when there was a chinese character at the beginning of the
file name. However, I discovered that there were some file names where these
characters showed up somewhere in the middle of the name...

Thanks for all the input.
 
This has been resolved via Tom's suggestion (thanks again).

I had to jerry-rig the code a bit, though, as Tom's code (utilizing the AscW
function) worked when there was a chinese character at the beginning of the
file name.  However, I discovered that there were some file names where these
characters showed up somewhere in the middle of the name...

Thanks for all the input.

--
Craig











- Show quoted text -

Hey Craig,
I've done it old school. I created text file and named it with your
file name above. In Windows XP Pro, it displayed the boxes as you're
seeing. In DOS it displays the "??".

Simple batch file was able to handle it two different ways.

@echo off
copy "??_China brochure.msg" NewName.msg
del "??_China brochure.msg"

ren "??_China brochure2.msg" NewName2.msg

If you can read in the file names with your function write out a batch
file with all the rename commands and then shell to it. It's almost
too easy.... hehehe

Hope this helps,
Chris M.
 
Good to know...thanks for that.

--
Craig


mcescher said:
Hey Craig,
I've done it old school. I created text file and named it with your
file name above. In Windows XP Pro, it displayed the boxes as you're
seeing. In DOS it displays the "??".

Simple batch file was able to handle it two different ways.

@echo off
copy "??_China brochure.msg" NewName.msg
del "??_China brochure.msg"

ren "??_China brochure2.msg" NewName2.msg

If you can read in the file names with your function write out a batch
file with all the rename commands and then shell to it. It's almost
too easy.... hehehe

Hope this helps,
Chris M.
.
 
Back
Top