Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

list of files in a directory in unicode format

88 views
Skip to first unread message

Maurice

unread,
Mar 29, 2008, 11:15:50 AM3/29/08
to
Hello:

I would to get a list of files in a directrory, I tried: system("dir /s >
list.txt"); then I filtered and treated list.txt, it was ok.
Now there is some files'names in other national language (not latin
characters), how to
get a list of their names in unicode format for example? (in the previous
method, I got a question mark for each non latin character)

Thanks
Maurice


Ed Mulroy [TeamB]

unread,
Mar 29, 2008, 1:43:01 PM3/29/08
to
The Windows API has the file search functions
FindFirstFile
FindNextFile
FindClose

You can look them up in the Windows API help.

The header files have macros to translate those names for ascii and unicode
applications, appending A or W respectively to the FindFirst* functions.

If you put
#define UNICODE
as the first line in the source file, before the include of windows.h, then
the headers will be expanded for unicode operations and the search functions
made into unicode ones.

. Ed

> Maurice wrote in message
> news:47ee...@newsgroups.borland.com...

0 new messages