Hello,
I'm trying to extract filenames to a txt file in bulk mode. I mean I have a folder with thousands of txt files and I want to extract filenames of all files to a txt archive.
What I've done is to select "restrict to filename" and in a subfilter I've used "extract matching lines" (using a common name present in all files), but it doesn't work for me (error: can't create filename)...
I also used as a subfilter "add left margin" so next to do is replace useless part of filename, but no success
So I need some help, thank you very much
(sorry for my English, it's not my native language)
thnx
extract filenames to textfile
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
-
- Posts: 988
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Why do you need TextPipe to do this?
You simply can do this without using TextPipe!
The following Windows command (in a Command Prompt window) would suffice:Note: I merely illustrated using drive H [say] to store the text file, so that it doesn't get included in the list. Use any convenient path instead of H:\
For your_name common to all files, simply use some wildcard matching in the filespec:Adapt the filespec to suit whatever you are trying to match.
If you want to repeat this task again in the future, simply save the command line in a suitably named .CMD file.
The following Windows command (in a Command Prompt window) would suffice:
Code: Select all
dir/b >H:\filenames.txt
For your_name common to all files, simply use some wildcard matching in the filespec:
Code: Select all
dir/b your_name*.* >H:\filenames.txt
If you want to repeat this task again in the future, simply save the command line in a suitably named .CMD file.
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
This can also be done with TP if you need to remove certain filenames from the list. Try this (in sysadmin\generate file list.fll)
Code: Select all
|
|--Input from file(s)
| [ ] Confirm before processing each file
| [X] Confirm before processing read/only files
| [ ] Delete input files after processing
| Process binary files
|
|--Remove all
|
|--Add header [@fullInputFilename\013\010]
|
+--Merge output to file c:\myfilelist.txt
Files List
----------