From: ab` on
If the .exe file and parameter are run through GetShortPathName(), batch
files work with non-ANSI filenames.

If 8.3 filename generation is turned off in the OS, GetShortPathName()
returns the full non-ANSI filename. For those (hopefully rare) cases,
users will need to use the .bat parser.
From: Mihai N. on
> If the .exe file and parameter are run through GetShortPathName(), batch
> files work with non-ANSI filenames.

Might work in most cases.
But depends a lot what you do with those files.
You can't for instance rename SomeInternationalName.txt to
SomeInternationalName_old.txt

But you know what? In the end, instead of writing a .bat parser
that you ask the users to install, why not ask them to install
Power Shell?
Or stop use JavaScript/VBScript, which is there and works?

In the end, it is your call, of course. But writing your own
will probably end up being more expensive in the end.


--
Mihai Nita [Microsoft MVP, Visual C++]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email

From: ab` on
Thanks, .vbs scripts do the job nicely. The only trick was to write
them in UTF16-LE.

A sample (that works):
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.run("""MyProg.exe"" ""的翻.data""")

Now the app is creating both a .bat and .vbs file that are functionally
identical. The .bat file uses shortened filenames, with a REM statement
referencing the full unicode names.
From: Mihai N. on
> Thanks, .vbs scripts do the job nicely. The only trick was to write
> them in UTF16-LE.

Sorry, yes, I should have said you need utf-16.
But glad it works for what you need.


--
Mihai Nita [Microsoft MVP, Visual C++]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email

 | 
Pages: 1
Prev: Problem with GetWindowRect
Next: MQMS versus SQMS