Jump to content

Recommended Posts

Posted

I am using FileExists to see if a particular directory exists. I want to use wildcards and the function doesnt seem to support wildcards.

What I am doing is seeing if DotNet framework is installed on the computer by searching FileExists(EnvGet("WINDIR") & "\Microsoft.Net\Framework\v2.0*") The wildcard gets ignored. I dont want to hard code this as if the version changes with a service pack or something it will keep re-installing itself.

Any ideas or other ways around this?

Thanks,

Keith Lewis

Posted

Hi,

don't you think it could be easier to check the registry?

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Posted

I dont know of any registry key that is consistant with what version of framework is installed. Even if there was you would still be stuck on the wildcard. I dont see anything that lets you search a specified registry key with a wildcard.

Thanks

KAL

  • Developers
Posted

I dont know of any registry key that is consistant with what version of framework is installed. Even if there was you would still be stuck on the wildcard. I dont see anything that lets you search a specified registry key with a wildcard.

Thanks

KAL

Use FileFindFirst()/FileFindNext(), that allows wildcards and check for Directories....

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

Posted

Thank you for this. FileFindFirst worked like a charm. I looked at this but didnt see any mention about directories.

KAL

Use FileFindFirst()/FileFindNext(), that allows wildcards and check for Directories....

  • Developers
Posted (edited)

Thank you for this. FileFindFirst worked like a charm. I looked at this but didnt see any mention about directories.

KAL

Often make mistake :)

Just test if its a directory by something like:

If StringInStr(FileGetAttrib($Whole-Path-to-File), "D") > 0 Then
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.
  :)

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
×
×
  • Create New...