List file names from a directory - Vietnames

  • Thread starter Thread starter Mike Phan
  • Start date Start date
  • Tags Tags
    File List
Click For Summary

Discussion Overview

The discussion revolves around the challenge of listing file names from a directory containing Vietnamese characters using a VB6 program. Participants explore potential solutions for handling character encoding issues that arise when outputting these file names to MS Word.

Discussion Character

  • Technical explanation
  • Exploratory

Main Points Raised

  • Mike describes the issue of Vietnamese characters being represented as question marks in the output of his VB6 program.
  • One participant suggests using UTF-8 encoding for file I/O in VB6, although they are unsure how to implement this.
  • Another participant proposes using the Windows command prompt to generate a text list of file names, detailing the steps to do so, including using the 'cmd /u' command for Unicode output.
  • Mike expresses gratitude for the suggestion provided by the second participant.

Areas of Agreement / Disagreement

Participants present different approaches to the problem, and while suggestions are made, there is no consensus on a definitive solution for the encoding issue in VB6.

Contextual Notes

The discussion does not address specific limitations of the proposed methods or the exact implementation details in VB6, leaving some assumptions and technical steps unresolved.

Mike Phan
Messages
67
Reaction score
0
Hi everyone,

I have a folder of Vietnamese songs (files). The file names are in Vietnamese.
I used a VB6 program to create a list of file names and output them to MS-word.

The program won't understand the Vietnamese characters, suc as ^, ., ~..., so it was represented by question marks (?) on the output.

I am not a programmer (electrical instead). So I get stuck! Anybody please help?

Thanks a lot and a lot!


Mike

PS: If I select one of the file names, copy and paste it to MS-word, it would be fine. The problem is that I cannot do it manually since there are many files.
 
Technology news on Phys.org
When doing the file I/O to read the file names, you might try using UTF-8 encoding instead of the default. I don't know how to do this in VB6 though.
 
Not sure if it would work on Vietnamese characters but I know it works on some symbols...

A quick and easy way I use to get a text list of all the file names from a folder (sometimes with symbols) is use the Windows command prompt.

Fist click on 'Start' then 'Run' and type in 'cmd' and click 'OK' to open it.

Lets say your list of songs is in this folder:
C:\Songs

1.) Type: 'cmd /u' (This makes your output in unicode if you have non-ascii characters to output)

2.) Type: 'cd C:\Songs' (This takes you to the folder to output the file)

3.) Type: 'dir C:\Songs > SongList.txt' (this outputs all the filenames in the folder 'C:\Songs' into a file called 'SongList.txt')

Then in that folder, you will get a file called 'SongList.txt' that contains a list of every file in the folder 'C:\Songs'
 
THANKS, x12179x!
 

Similar threads

Replies
35
Views
7K
  • · Replies 27 ·
Replies
27
Views
6K
  • · Replies 35 ·
2
Replies
35
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 75 ·
3
Replies
75
Views
6K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K