I get multiple file paths from different directory tools now I have to segregate based on the folder name
FilePath |
C:\program\ABC\lmnop.xlsx |
C:\program\mnop.xlsx |
C:\program\ABC.xlsx |
1. Take the file name and keep it in a separate column (name: filename)
2. Check if the last folder is ABC or not (using filter)
Check out the File functions: File Functions | Alteryx Help
In your case you can use FileGetFileName to get the file name. For the folder you could use FileGetDir but that returns the whole file path excluding only the filename and extension, so you would need to do more if you just need the final folder. I used this RegEx formula instead:
REGEX_Replace([FilePath], '.*\\(.+)\\[^\\]+', '$1')
@Sshasnk I'd first split out the two parts with the following expressions:
Then for tackling the Directory filter, just check if it ends with \ABC\ like so: