![]() |
Get the count of total number of files under a folder.
Hi,
What is the script to get the count of files under a folder? Please advice. Thanks in advance, Regards, John. |
:-)
As a famous philosoph said a long time ago: "RTFM!" :D
Joke... But exactly there is the answer. Keyword: "File Functions Header" code: have fun cheers |
|
The NSIS User Manual has some appendices describing lots of useful functions together with sample code showing how to use them.
Appendix E.1 (File Functions Header) includes the GetSize function which can be used to count the number of files in a folder or in a folder and its sub-folders: http://nsis.sourceforge.net/Docs/AppendixE.html#E.1.3 |
Or if you don't need recursive searches, you can just use something simple like this:
PHP Code:
|
You need to ignore $1 if it is . or ..:
Stucode: |
Quote:
|
Sorry you are right of course. Fixed the error with the FileExist check ($1 is only the file name, not the complete path).
Stu |
| All times are GMT. The time now is 17:34. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.