java.io.File s1 = new java.io.File("/saves/save1.sav");
java.io.File s2 = new java.io.File("/saves/save2.sav");
java.io.File s3 = new java.io.File("/saves/save3.sav");
java.io.File s4 = new java.io.File("/saves/save4.sav");
This code sets the s variables to the location of specific files. I am looking for a way to use a for loop to check if variable s+"i" exists until it finds that it doesn't exist, then creates a new file named "save+"i".sav". (The +"i" means the number that will go after it.) Basically, I want it to create a new save file that does not overwrite other save files if there are any and gives it the name of "save(save #).sav". The code above may become obsolete. This way, I won't have to write a bunch of if statements and I can put all the code in a single statement. Thanks in advance to anyone willing to help. -Santiago