Read from folder

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Garren

Read from folder

Postby Garren » Thu Mar 11, 2004 10:31 am

I have to say I love TextPipe. I was able to succesfully do a conversion for my job and my boss is very happy. I now have another job to do...

Is it possible to create a text file and put a list of files that are in a folder in that text file with TextPipe? Along with the name of the file will be some other stuff like the path of the file and some other stuff from another file.

Thanks,
Garren

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

Postby DataMystic Support » Fri Mar 12, 2004 7:50 am

I'm unsure exactly what you are doing, but you can use the macro @fullInputFilename inside Add Header/footer/margin filters, and you can use a Scripting filter to open and write to files and to other arbitrary processing.
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

Garren

Postby Garren » Fri Mar 12, 2004 8:58 am

What I was wanting was a text file with the names of the files in a directory. So I came up with the following filter that seems to work. I just exclude the first 1000000 from the start of the file, and grab the filename and merge it into one text file.

Filter List
-----------
Filter options
| [X] Log to file
| [X] Append to logfile
| Log filename: C:\BP\textpipe\install\textpipe.log
| Threshold 500
|
|--Input from file(s)
| [ ] Confirm before processing each file
| [ ] Confirm before processing read/only files
| [ ] Delete input files after processing
| Process binary files
|
|--Exclude 1000000 lines from start of file
|
|--Add header [@inputFilename ]
|
+--Merge output to file C:\Documents and Settings\gwood\Desktop\mergefilename.txt

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

Postby DataMystic Support » Fri Mar 12, 2004 9:52 am

Just use the Delete All filter - it is far quicker.
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

jring
Posts: 18
Joined: Tue Sep 23, 2003 3:13 am

Postby jring » Fri Mar 12, 2004 4:36 pm

hmmm... If I'm understanding you correctly,
you could goto a dos prompt and type:

dir /B > filename.txt

Guest

Postby Guest » Sat Mar 13, 2004 2:19 am

jring - thanks that DOS command did work. I didn't know about that.
Thanks,
Garren

jring
Posts: 18
Joined: Tue Sep 23, 2003 3:13 am

I use that alot....

Postby jring » Fri Mar 26, 2004 7:05 pm

here's a little trick is a great way to organize files on a daily basis... ie. weblogs, email logs, stock information or anything where you may have lots of files spread out over time:

1. do the date > C:\date.txt trick to output the date into a .txt file.
2. Strip out extraneous info from the textfile until only the date Remains.
3. Change the slashes in '99\99\9999' so that it reads 99_99_9999.
4. Repeat the file twice so that it reads:

99_99_9999
99_99_9999

4. Restrict to top line & add a lft-margin "MD C:\whatever\path\you\want\ "
5. Restrick to second line and add a left margin:

"Xcopy C:\original\path\*.* C:\whatever\path\you\want /q

6. Output the result to batch file "C:\COOLBATCH.bat"


Now create another .bat file which you can setup on a timer that reads something like this:

date > C:\date.txt
C:\program files\tpprt\textpipe.exe /f=c:\process_date_file.fll /g /q
Call C:\Coolbatch.bat
Del Original_Files /q



if you let this run, all of your files will be 100% organized into nice neat folders on a daily basis without any extra work....ever!

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

Postby DataMystic Support » Mon Mar 29, 2004 8:37 am

You could also use a vbscript filter to add the date...but it's a neat trick of Joseph's all the same.
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 1 guest