Splitting a text file into multiple files
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have a large text file that has many page breaks that are denoted by a line "___________________". I need to create separate text files for each section (create a separate file at each page break). I am new to using Alteryx and not sure how I can do this. Thanks in advance!
Solved! Go to Solution.
- Labels:
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Possible to share sample data ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have attached a small amount of sample data. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here you go.
The mulit-row formula creates a new filed called FileSuffix that get incremented every time it finds a "_______". The output tool is configured to add the suffix to the output file name and so creates a new file every time the suffix changes
It currently includes the "__________" row in the output files. If you want to remove them add a filter after the multi-row tool and set the custom filter to
!Startswith( [Field_1],"________") |
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here is the sample workflow for your case. Hope this is helpful.
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you!
