FMS Posted May 27, 2011 Share Posted May 27, 2011 (edited) Hi all... I'm making a script whit the following lines in it If FileExists(@ScriptDir & "\file01.bmp") Then $path = (@ScriptDir & "\File01.bmp") Else For $i1 = 0 to 9 step 1 For $i2 = 0 to 9 step 1 $path = (@ScriptDir & "\File" & $i1 & $i2 &".bmp") EndIf as you can see isn't it mush and not working I hope it's readeble for you guys but I wanna use a decending path number iff file 01 is exsisting. So iff file01 exsist use file02 otherwise 03 ~....~ otherwise 11, 12, 13 etc. Could somebody help me whit this? thnx in advanced Edited May 27, 2011 by FMS as finishing touch god created the dutch Link to comment Share on other sites More sharing options...
hannes08 Posted May 27, 2011 Share Posted May 27, 2011 (edited) $path = "" $i = 0 Do $i += 1 $path = @SCriptDir & "\File" & StringFormat("%02s", $i) & ".bmp" Until Not FileExists($path) Edit: Removed error in script. Edited May 27, 2011 by Hannes123 Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
FMS Posted May 27, 2011 Author Share Posted May 27, 2011 YESZZZZZZZZzzzzzzzzzzz thnx alot thats what i was looking for as finishing touch god created the dutch Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now