Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Finding File name from wildcard search?

$
0
0
Here is a small section of my script. What I am trying to accomplish is that I am finding these files by using wildcards in fileexists(). Is there any possible way to get the filename based off of wildcards if only one file matches the criteria? Something like filegetname("1*.bkf") that returns the full file name.

I would like this script to be able to stringtrimleft($string,1) the filename, so that I can change the first portion of file name.

File name example:

"0 01-31-13 16.01.20 full System Backup.bkf"

would change to:

"1 01-31-13 16.01.20 full System Backup.bkf"



For $z = 5 to "0" Step -1
If FileExists($backupdest & $z & "*.bkf") Then
FileMove($backupdest & $z & "*.bkf",$backupdest & ($z+1) & "*.bkf",0)
EndIf

Any help would be appreciated. Thanks.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>