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.