Jump to content

FileFindFirstFile


Recommended Posts

Hello,

I often tried to write scripts with relative paths. For example with the @ScriptDir Macro to convert all jpg pictures in the script's folder to thumbnails:

$search = FileFindFirstFile('"' & @ScriptDir & '\*.jpg' & '"')

; Check if the search was successful
If $search = -1 Then
    MsgBox(0, "Error", "No files/directories matched the search pattern")
    Exit
EndIf

While 1  ; create Thumbnails
    $file = FileFindNextFile($search)
    If @error Then ExitLoop 
    $i = $i + 1
    RunWait("C:\Programs\make_thumb.exe " & $file, "", )
WEnd

FileClose($search)oÝ÷ Ù8^IÊâ¦Ö¥Á¬¬µêæv­zÌ"¶axǬ±¨ªê-6âë?v*ÞrÚ+ë&j×!yÛazÇ­ÈijÛ^®z®¢Ö¥¶.az·­ç^~)âµérW¬{aÇè׫N¨¶«Á¬®§v'Èr§ëayø«²Ùbëhjv²nµêZ¶azÇ+p¢¹,){^r×z®¶­sbb33c·6V&6ÒfÆTfæDf'7DfÆR3¢b3#´fÆW2b3#²¢æ§r

Of course it would be better, if the script would work with relative paths...

I'm sure that there is only a small change necessary, but I have no idea... :)

Any help would be appreciated!

Greets pase :)

Link to comment
Share on other sites

  • Developers

That is really amazing, I got a reply, which solves my problem, within two minutes :)

mmmm not sure how to interpret that line and I should take that personal .. (j/k) :)

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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