roadrunner Posted August 30, 2005 Posted August 30, 2005 I'm new to auti 3 so be gentle i have been tring to write a script that will just search all the hard drives on the computer and report back if it there, sound simple but i'm stuck. does anyone have a script that does this or could someone tell how to get a script to get a listing of directorys and then change through the directorys any help welcome
BigDod Posted August 30, 2005 Posted August 30, 2005 I'm new to auti 3 so be gentlei have been tring to write a script that will just search all the hard drives on the computer and report back if it there, sound simple but i'm stuck.does anyone have a script that does this or could someone tell how to get a script to get a listing of directorys and then change through the directorysany help welcome <{POST_SNAPBACK}>I think that this post belongs in V3 Support.Posdt what you have written so far and someone may help. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
w0uter Posted August 30, 2005 Posted August 30, 2005 you should use STD/IO My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
w0uter Posted August 30, 2005 Posted August 30, 2005 (edited) [edit] used set prior to speed it up [/edit] expandcollapse popup;let's build an array of subfolders $aFolder = _GetFileList("C:\", '/S') For $i = 1 to Ubound($aFolder)-1 ConsoleWrite($aFolder[$i] & @LF) Next Func _GetFileList($s_Folder, $s_Switch = '') ;--------------------------------------------------------------------------------------------------- ;$psSwitch can be the following kinds of things: ; /AD list folders only ; /A-D list files only ; /S /AD list all folders and subfolders recursively ; /A-D /OE list only files, and group them by extension ; ; <<< parameters to the DIR command >>> ; ; /A Displays files with specified attributes. ; attributes D Directories R Read-only files ; H Hidden files A Files ready for archiving ; S System files - Prefix meaning not ; /O List by files in sorted order. ; sortorder N By name (alphabetic) S By size (smallest first) ; E By extension (alphabetic) D By date & time (earliest first) ; G Group directories first - Prefix to reverse order ; /T Controls which time field displayed or used for sorting ; timefield C Creation ; A Last Access ; W Last Written ; /S Displays files in specified directory and all subdirectories. ; /X This displays the short names generated for non-8dot3 file ; names. The format is that of /N with the short name inserted ; before the long name. If no short name is present, blanks are ; displayed in its place. ;--------------------------------------------------------------------------------------------------- Local $s_r = '' Local $p_pid = Run(@COMSPEC & " /c DIR /B " & $s_Switch & ' "' & $s_Folder & '"', "", @SW_HIDE, 2) ProcessSetPriority($p_pid, 5) While Not @error $s_r &= StdoutRead($p_pid) WEnd Return StringSplit(StringTrimRight(StringReplace($s_r, @CRLF, @LF), 1),@LF) EndFunc Edited August 30, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
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