List file names from a directory - Vietnames

  • Thread starter Mike Phan
  • Start date
  • Tags
    File List
In summary, Mike is having trouble with a VB6 program not recognizing Vietnamese characters when creating a list of file names to output to MS-word. He is seeking help and someone suggests using UTF-8 encoding or using the Windows command prompt to get a text list of file names.
  • #1
Mike Phan
67
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
  • #2
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.
 
  • #3
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'
 
  • #4
THANKS, x12179x!
 

1. How do I list all file names from a directory in Vietnamese?

To list all file names from a directory in Vietnamese, you can use the command "ls" followed by the directory path. For example, "ls /home/username/directory" will list all the file names in that directory in Vietnamese.

2. Can I list only specific file types in Vietnamese?

Yes, you can use the command "ls *.filetype" to list only files with a specific file type. For example, "ls *.txt" will list all files with the .txt extension in Vietnamese.

3. How do I list all files and directories in a tree structure in Vietnamese?

You can use the command "tree" to list all files and directories in a tree structure in Vietnamese. This command will show the hierarchy of the files and directories in the specified directory.

4. Is there a way to list file names in a specific order in Vietnamese?

Yes, you can use the command "ls -l" to list file names in a specific order in Vietnamese. This command will list the files in long format, which includes more details about each file such as size, owner, and date modified.

5. Can I save the listed file names in a text file in Vietnamese?

Yes, you can use the command "ls > filename.txt" to save the listed file names in a text file in Vietnamese. This command will redirect the output of the "ls" command to a text file named "filename.txt".

Similar threads

  • Programming and Computer Science
Replies
21
Views
452
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
27
Views
4K
  • Programming and Computer Science
3
Replies
75
Views
4K
  • Programming and Computer Science
Replies
4
Views
5K
  • Programming and Computer Science
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Programming and Computer Science
Replies
2
Views
3K
Replies
14
Views
2K
  • Programming and Computer Science
Replies
1
Views
3K
Back
Top