Contributed By: Larry D Woods [email protected]
Submitted On: 03/04/98
Using llc to get directory file count
Use llc (http://www.mjtnet.com/forum/viewtopic.php?t=1550) to help you determine the number of files in a directory and create an ini
file that can interrogate it.
dir /b *.txt | llc [TEXT] Text=~ >Parms.ini
will create Parms.ini :
[TEXT]
Text=4
assuming 4 txt files.
Now, in Macro Scheduler, the sequence that will generate this file, and read it is:
Run Program>command.com /c dir /b *.txt | llc [TEXT] Text=~ >Parm.ini
ReadIniFile>Parm.ini,TEXT,Text,Count
You can add additional fields to this ini file.  For example:
Run Program>command.com /c dir /b *.bat | llc [BATCH] Batch=~ >>Parm.ini
Outputs:
[BATCH]
Batch=3
and the above lines will be appended to the existing file.
If you want to move the resulting counts into another permanent ini file:
ReadIniFile>Parm.ini,TEXT,Text,TextCount
EditIniFile>Final.ini,TEXT,Text,%TextCount%
Pick up llc FREE here
Get Directory File Count - Example of the use of llc (Script
Moderators: Dorian (MJT support), JRL, Phil Pendlebury
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact: