Skip to content

Home of FilesName2CSV

Alex edited this page May 8, 2020 · 3 revisions

Welcome to the FilesName2CSV wiki!

Here you can find my very Own Tool for extracting data from a custom build filename convention to CSV format that can easily used to fill excel-like prospect

The tool should work with default option on every type of folder containing files. By using the parsing option Underscore sep values ending with E cent amount the program is expecting a folder containing PDF named as the following:

a) 20190729_farmaci_14E43cent.pdf

b) 20190716-20190918_presidi_180E00cent

Both kind of naming will return 5 values, with the only difference that the first one will have an empty val on the ending date since it is missing. Based on example above the list will be generated as following:

"20190729_farmaci_14E43cent.pdf", "20190729","", "farmaci", "14.43"

"20190716-20190918_presidi_180E00cent","20190716","20190918","presidi","180.00"

The core for parsing logic which is using a RegularExpression and it is inside a single function named ParseFileName, in order to be easily changed to serve other purposes even if you are not very expert with C#

Clone this wiki locally