How to use Batch File to check CSV files encoded

caoyan10

Distinguished
Aug 26, 2011
2
0
18,510
0
Dear All,
The purpose of this concern is to create an MS-DOS batch file that will check on all the csv files for its encoding. The files should be encoded in UTF-8.
An MS-DOS batch file will be clicked that will perform the following:
• Check all csv files in the folder for its encoding type
• Files that are not in UTF-8 format will be converted o UTF-8 with a new name and keep the old one
• Files that are already in UTF-8 will not be changed
• Generate one log file in txt format for the result
 

caoyan10

Distinguished
Aug 26, 2011
2
0
18,510
0


Thanks PhilFrisbie, could you provide more information on that. If possible, could you create the script for me, it's urgent for out team to done this work in short time. Very appreciate.

 

PhilFrisbie

Distinguished
Apr 22, 2006
666
0
19,310
53
There are so many options for the encoding of CSV files that you must look at the spec of the software creating the files so you can determine how to identify whether they are fully UTF-8 or not, and then how to convert them.

For example, a file might be entirely UTF16 with a BOM, and that would be trivial to convert. But a file could be a mix of UTF-8 and UTF-16, and that is more difficult to convert.
 
Thread starter Similar threads Forum Replies Date
David___Only Apps General Discussion 0
S Apps General Discussion 4
M Apps General Discussion 3
D Apps General Discussion 2
N Apps General Discussion 1
NoctisLionward Apps General Discussion 2
malavena Apps General Discussion 3
Tom Waller Apps General Discussion 2
P Apps General Discussion 1
S Apps General Discussion 4
A Apps General Discussion 13
Z Apps General Discussion 1
P Apps General Discussion 7
G Apps General Discussion 0
T Apps General Discussion 5
SHADOWSTRIKE1 Apps General Discussion 3
S Apps General Discussion 3
R Apps General Discussion 3
P Apps General Discussion 2
M Apps General Discussion 3

ASK THE COMMUNITY