Jump to content

How to find directory and subdirectory


Melkor
 Share

Recommended Posts

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 directories

DIR /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.

Link to comment
Share on other sites

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"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

:lmao:

Edited by MHz
Link to comment
Share on other sites

:lmao: 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 :ph34r:

Thanks once more.

Luck, Love and PatienceNikita

Link to comment
Share on other sites

This is probably because you will not find (as fare as I am aware of) specific search functions for directories in the windows api.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...