I need a macro or executable that can take a plain text file, "split" it into multiple files, one file per line, and place these files into a folder selected by the user.
## Deliverables
Attached you will find an example of the type of file that will be used as input. The sample file is a .csv, as most of the input files will be, but don't let that fool you...it's plain text and should be treated as if it were a .txt file.
When the program is run, it should first prompt the user for the location of the input file via a dialog box. (If you do this as a VBA macro, you can skip this step, as the user will already have the file open in Excel 2007.)
It should then prompt for a folder path (again via dialog box), filename prefix, and file extension. Then, it should split the file into multiple files, one per line. Each file should consist of the text from that line, *and one carriage return.
*It should save these files to the folder selected by the user. For the file names, it should use the user-entered filename prefix, an incremented integer, and the user-ented extension.
So, a sample run might go like this. I run the program on the attached Sample.csv. I enter the following information:
**Folder Path:** C:\TestRun
**Filename Prefix:** Sample
**File extension:** txt
The program will then split the file into multiple files, and save them to C:\TestRun as [login to view URL], [login to view URL], [login to view URL], and so on. [login to view URL] would contain all the text on the first line of the input file, followed by a carriage return. [login to view URL] would contain all the text on the second line and a carriage return, and so on.
Should be simple enough. Let me know if you have any questions. Thanks!