Wednesday, January 2, 2019

Automatically create a 'txt' file from a list in another txt file

I have windows 7, and little/no programming experience, I was wondering if a simple .BAT file would suffice.


I have a list of 'names' that I have to create an individual text file on an on-going basis. The files are to have no content, just simply entered into a system as the file name. The volume of files could be 2-100 each time I want to use it.


I can place all the 'names' in a separate "extract.txt" file, each on a separate line. (The 'names' are generated using excel, and appending several descriptors, and finally stored as 'text')


I then want to create an individual text file for each line in "extract.txt".


e.g. Extract.txt file contains


GKL_ERT_55555_20170807143400_1
GKL_ERT_55556_20170807143400_1
GKL_ERT_55557_20170807143400_1
GKL_ERT_55558_20170807143400_1

I want 4 text files with no content in a folder named as


GKL_ERT_55555_20170807143400_1.CTR
GKL_ERT_55556_20170807143400_1.CTR
GKL_ERT_55557_20170807143400_1.CTR
GKL_ERT_55558_20170807143400_1.CTR

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...