Kyme Posted October 26, 2008 Share Posted October 26, 2008 (edited) i have make this script $message = "Hold down Ctrl or Shift to choose multiple files." $file = FileOpen(@ScriptDir & "\Index.txt", 1) $file2 = FileOpen(@ScriptDir & "\Index1.txt", 1) $var = FileOpenDialog($message, @ScriptDir & "", "Maps (*.bsp)|All (*.*)" , 1 + 4 ) If @error Then MsgBox(4096,"Error","No File(s) chosen") Else $var = StringReplace($var, "|", @CRLF) $var = StringReplace($var, @WorkingDir, "Folder="&@WorkingDir&@CRLF) If FileExists($file) Then FileWrite($file2, $var) Exit Else FileWrite($file, $var) Exit EndIf EndIf but i wanna make it when i index one folder and Index.txt exist to make index2.txt if file index2.txt exist to make index3.txt..... index(infinite).txt how i can make this??? tnx Edited October 26, 2008 by Kyme Link to comment Share on other sites More sharing options...
TehWhale Posted October 26, 2008 Share Posted October 26, 2008 $message = "Hold down Ctrl or Shift to choose multiple files." $var = FileOpenDialog($message, @ScriptDir & "", "Maps (*.bsp)|All (*.*)", 1 + 4) If @error Then MsgBox(4096, "Error", "No File(s) chosen") Else $i = 0 $var = StringReplace($var, "|", @CRLF) $var = StringReplace($var, @WorkingDir, "Folder=" & @WorkingDir & @CRLF) Do $i = $i + 1 Until Not FileExists(@ScriptDir & "\Index" & $i & ".txt") FileWrite(@ScriptDir & "\Index" & $i & ".txt", $var) EndIf Link to comment Share on other sites More sharing options...
Kyme Posted October 26, 2008 Author Share Posted October 26, 2008 $message = "Hold down Ctrl or Shift to choose multiple files." $var = FileOpenDialog($message, @ScriptDir & "", "Maps (*.bsp)|All (*.*)", 1 + 4) If @error Then MsgBox(4096, "Error", "No File(s) chosen") Else $i = 0 $var = StringReplace($var, "|", @CRLF) $var = StringReplace($var, @WorkingDir, "Folder=" & @WorkingDir & @CRLF) Do $i = $i + 1 Until Not FileExists(@ScriptDir & "\Index" & $i & ".txt") FileWrite(@ScriptDir & "\Index" & $i & ".txt", $var) EndIf awesome man....tnx very very much for helping me Regards Link to comment Share on other sites More sharing options...
TehWhale Posted October 26, 2008 Share Posted October 26, 2008 (edited) awesome man....tnx very very much for helping me RegardsHello, It appears you have found your answer to your question. Please take the time to edit your thread title with [RESOLVED] so others know that is it resolved. You can do this by scrolling to the top of your thread, clicking EDIT and then Full Edit and adding: "[RESOLVED]" to the front of your thread title. Thanks for your cooperation. Edited October 26, 2008 by TehWhale 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