Melkor Posted October 17, 2006 Share Posted October 17, 2006 I know how to find files by mask (FileFindFirstFile and FileFindNextFile), but don't know and can't find how search directory . May be in my help-file there isn't it. Luck, Love and PatienceNikita Link to comment Share on other sites More sharing options...
Uten Posted October 17, 2006 Share Posted October 17, 2006 If You search for FileFindFirst and FileFindNext you will find plenty of samples. You could also use a file mask like *.* And check for type with FileAttrib($file) If you use this command in a @comspec window you will get the directoriesDIR /A:D /S /B Obviously you will have to wrap it up with Run and redirect it to a file or read the STDIO from Run with StdoutRead. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Melkor Posted October 17, 2006 Author Share Posted October 17, 2006 ok. I reformulate my question. May be I convey my minds wrong. How get list of directories in current directory? Luck, Love and PatienceNikita Link to comment Share on other sites More sharing options...
MHz Posted October 17, 2006 Share Posted October 17, 2006 (edited) You can use FileGetAttrib() to recognize directories as you loop with FileFindFirstFile and FileFindNextFile. ; checks if $file is a directory If StringInStr(FileGetAttrib($file), 'D') ThenoÝ÷ Øò¢èî²ÜÛayØ«yËh®'¬¢yr¶§Ê¢é]ºÇºv§u+]¢ëQy§Z±K^)©'¬¢·¯z{¬x*&¶hÔáȬjw±jjez¢f®¶sc²&WGW&ç2föÆFW'26öÆÆV7Föâ6öç67FæröbÆÂföÆFW'26öçFæVBâ7V6fVBföÆFW"À£²æ6ÇVFærF÷6RvFFFVâæB77FVÒfÆRGG&'WFW26W@¢b33c·7V&föÆFW'2Òõ7V$föÆFW'2v÷&¶ætF"fײb33²b3#²b33²¤bæ÷BW'&÷"FVà ×6t&÷Âb33´ÆÂ7V$föÆFW'2b33²Âb33c·7V&föÆFW'2 b33c·7ÆBÒ7G&æu7ÆBb33c·7V&föÆFW'2Â5$Äb bæ÷BW'&÷"FVà f÷"b33c¶ÒFòb33c·7ÆE³Ð ×6t&÷Âb33´V67V$föÆFW"b33²Âb33c·7ÆE²b33c¶Ò æW@ VæD`¤VæD` ¤W@ ¤gVæ2õ7V$föÆFW'2b33c·4föÆFW%F Æö6Âb33c¶46öÆÆV7FöâÂb33c¶ôe4òÂb33c¶ôFVÒÂb33c¶ôföÆFW%FÂb33c·5F÷FÀ b33c¶ôe4òÒö&¤7&VFRb33µ67&FæräfÆU77FVÔö&¦V7Bb33² bæ÷BW'&÷"FVà b33c¶ôföÆFW%FÒb33c¶ôe4òävWDföÆFW"b33c·4föÆFW%F b33c¶46öÆÆV7FöâÒb33c¶ôföÆFW%Få7V$föÆFW'0 f÷"b33c¶ôFVÒâb33c¶46öÆÆV7Föà b33c·5F÷FÂf׳Òb33c¶ôFVÒäæÖRfײ5$Ä` æW@ &WGW&â7G&æu7G&u2b33c·5F÷FÂÂ2 VÇ6P &WGW&â6WDW'&÷"ÂÂb33²b33² VæD`¤VæDgVæoÝ÷ Ú¢gbç-Â+a¢ëmå«¢+Ù±½°ÀÌØí ½±±Ñ¥½¸°ÀÌØí½M Edited October 17, 2006 by MHz Link to comment Share on other sites More sharing options...
Melkor Posted October 17, 2006 Author Share Posted October 17, 2006 Thank you very much! I'll be use it. But use object for search directories..., is it prodigally? AotoIT has function for search file, but hasn't for directiries. Alas. Still I'll be to attempt uncomfortable FileGetAttrib Thanks once more. Luck, Love and PatienceNikita Link to comment Share on other sites More sharing options...
Uten Posted October 17, 2006 Share Posted October 17, 2006 This is probably because you will not find (as fare as I am aware of) specific search functions for directories in the windows api. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling 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