AlienStar Posted August 11, 2009 Share Posted August 11, 2009 hello all I need a script can detect the number of files in a specific folder then send message ( any thing + the number of those files ) thanks so much Link to comment Share on other sites More sharing options...
zorphnog Posted August 11, 2009 Share Posted August 11, 2009 Look at _FileListToArray Link to comment Share on other sites More sharing options...
AlienStar Posted August 13, 2009 Author Share Posted August 13, 2009 Look at _FileListToArray I tried this code : #Include <File.au3> #Include <Array.au3> $FileList=_FileListToArray(@DesktopDir) If (Not IsArray($FileList)) and (@Error=1) Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf _ArrayDisplay($FileList,"$FileList") and it's good but I don't wanna to show list of the files .... only send message with the number of files Link to comment Share on other sites More sharing options...
water Posted August 13, 2009 Share Posted August 13, 2009 The number of files is in $FileList[0] My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
AlienStar Posted August 13, 2009 Author Share Posted August 13, 2009 (edited) The number of files is in $FileList[0] I tried this : #Include <File.au3> #Include <Array.au3> $FileList=_FileListToArray(@DesktopDir) If (Not IsArray($FileList)) and (@Error=1) Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf _ArrayDisplay($FileList[0],"$FileList") but it didn't work why ???? Edited August 13, 2009 by AlienStar Link to comment Share on other sites More sharing options...
water Posted August 13, 2009 Share Posted August 13, 2009 If you only need to display the number of files use something like: #Include <File.au3> #Include <Array.au3> $FileList=_FileListToArray(@DesktopDir) If (Not IsArray($FileList)) and (@Error=1) Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf MsgBox(64,"Result","Number of Files in " & @DesktopDir & " is " & $FileList[0]) My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
AlienStar Posted August 13, 2009 Author Share Posted August 13, 2009 If you only need to display the number of files use something like: #Include <File.au3> #Include <Array.au3> $FileList=_FileListToArray(@DesktopDir) If (Not IsArray($FileList)) and (@Error=1) Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf MsgBox(64,"Result","Number of Files in " & @DesktopDir & " is " & $FileList[0]) until this time everything is fantastic but I don't want to show location in Msgbox I mean like this : Number of Files is xxx thanks for helping me Link to comment Share on other sites More sharing options...
water Posted August 13, 2009 Share Posted August 13, 2009 (edited) Come on ... it can't be too hard to remove the path = @DesktopDir from the MsgBox statemen yourself. Edited August 13, 2009 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
AlienStar Posted August 13, 2009 Author Share Posted August 13, 2009 anyway thanks sooooooooooo much you get tired of me thanks again Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now