Suggestion: Put the new name into a variable and make the loop
while(file_exists(newFileName))
{
    newFileName = newname + "-" + string(n) + ".exe";
    n += 1;
}
file_rename("Gang Garrison 2.exe", newFileName);

Way less repetition :P