extract filenames to textfile

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

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

extract filenames to textfile

Postby tonycaso » Mon Jan 28, 2008 5:31 am

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

DFH
Posts: 654
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Why do you need TextPipe to do this?

Postby DFH » Mon Jan 28, 2008 7:15 pm

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

Postby tonycaso » Tue Jan 29, 2008 12:08 am

oook, :lol: thank you very much four your help, really thanks

User avatar
DataMystic Support
Site Admin
Posts: 2164
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Postby DataMystic Support » Tue Feb 05, 2008 8:10 pm

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


Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 11 guests