Jump to content

Recommended Posts

Posted

Hello guys,

I'm working on a script that needs to search for a specific folder using a string. Basically, all the folders are numbered, but they have some string in front of that number. How can I search for a folder and return its full name or full path.

Posted

Hello :) , 

 

Have you looked about the

FileExists

Or it does not meet your requirements ?? 

 

Please post a script of what you tryed so far.

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

  Reveal hidden contents

 

Posted (edited)

There are some ways, you can retrieve all folders to array and stringinstr it, or go with FileFindFirstFile

 

Edited by careca
  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted
  On 10/11/2018 at 11:33 AM, caramen said:

Hello :) , 

 

Have you looked about the

FileExists

Or it does not meet your requirements ?? 

 

Please post a script of what you tryed so far.

Expand  

FileExists only returns 0 and 1. I know the folder exists, but I only part of its string. I am using this script with another software and have the string , e.g., "123" and the folders are named "100_nice", "101_cool", ... "123_great", with no number being repeated. How do I get the full path to the "123_great"?

Posted
  On 10/11/2018 at 11:37 AM, Moist said:

 How do I get the full path to the "123_great"?

Expand  

Use wildcard with filefindfirstfile

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted

How are you finding these files yourself :o ? 

 

WIndows search ? 

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

  Reveal hidden contents

 

Posted (edited)

Oh...

Yeah no doubt 

 

filefindfirstfile

@careca had it for you :) 

 

$hSearch = FileFindFirstFile("*.*")

$sFileName = ""

$sFileName = FileFindNextFile($hSearch)

 

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

  Reveal hidden contents

 

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
  • Recently Browsing   0 members

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