Dear Team
I am using dirlist function but it is not working on my end. For reference a small application is attached.
The scenario is that I have number of files against each HH. When i try to know the total number of files against a specific HH id it shows 0.
Please see my syntax in attached application.
Please use 1234 for countfilenum Identification and HH ID is 1 to 3
In Name you can type anything.
thanks
a.
dirlist Function
-
- Posts: 572
- Joined: July 9th, 2012, 11:32 am
- Location: Islamabad, Pakistan
dirlist Function
- Attachments
-
- countfiles.rar
- (4.28 KiB) Downloaded 134 times
Re: dirlist Function
Hi Arshad,
You were almost there. You just need to pass in the folder name and file name as separate arguments. The following would accomplish this (I'm separating the folder name from the file name wildcard for clarity, not necessity):
You were almost there. You just need to pass in the folder name and file name as separate arguments. The following would accomplish this (I'm separating the folder name from the file name wildcard for clarity, not necessity):
PROC GLOBAL
list string filelisting;
string FNwildcard, FolderName;
PROC COUNTFILENUM_FF
PROC NAME
FolderName = "..\102_Data\";
FNwildcard = edit("9999",COUNTFILENUM_ID) +"-"+ edit("99999",HH_ID) + "*.txt";
dirlist(filelisting, FolderName, FNwildcard);
Sherrelllist string filelisting;
string FNwildcard, FolderName;
PROC COUNTFILENUM_FF
PROC NAME
FolderName = "..\102_Data\";
FNwildcard = edit("9999",COUNTFILENUM_ID) +"-"+ edit("99999",HH_ID) + "*.txt";
dirlist(filelisting, FolderName, FNwildcard);