extract filenames to textfile

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
tonycaso
Posts: 2
Joined: Mon Jan 28, 2008 5:18 am

extract filenames to textfile

Post by tonycaso »

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 :oops:

So I need some help, thank you very much
(sorry for my English, it's not my native language)

thnx
dfhtextpipe
Posts: 986
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Why do you need TextPipe to do this?

Post by dfhtextpipe »

You simply can do this without using TextPipe!
The following Windows command (in a Command Prompt window) would suffice:

Code: Select all

dir/b >H:\filenames.txt
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:

Code: Select all

dir/b your_name*.* >H:\filenames.txt
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.
tonycaso
Posts: 2
Joined: Mon Jan 28, 2008 5:18 am

Post by tonycaso »

oook, :lol: thank you very much four your help, really thanks
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

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
----------


Post Reply