I’ve never used Safecracker File before myself, but it looks like there’s an extension hook that you could use post-save (pre-save would obviously be much more helpful, but that doesn’t seem to exist!!):
http://ellislab.com/expressionengine/user-guide/development/extension_hooks/global/filemanager/index.html
Assuming you remove enough files from the directory to get back under 100 (so that the file uploads ok) you could write a pretty simple extension that appends, say, the logged-in member_id or a random hash to the filename after it has uploaded so that the next time someone attempts to upload it would succeed.
Otherwise, you could hack the core with a function that properly figures out the highest numbered file and increments the digit accordingly: I took this code from the old nGen File Upload fieldtype from back in the EE1 days (http://www.ngenworks.com)... hopefully they don’t mind me pasting it here:
// Check if file exists already, if it does add an increment to the file name
if( file_exists($upload_path . $file_name) ) {
$matching_files = glob($upload_path . $file['name'] . "*" . $file['ext']);
// Find highest number, add 1 and set new $file_name
sort($matching_files);
preg_match("/" . $file['name'] . "_(\d+)\." . substr($file['ext'], 1) . "/", basename(end($matching_files)), $matches);
if( isset($matches[1]) && $matches[1] ) {
$increment = "_" . ($matches[1] + 1);
} else {
$increment = "_1";
}
$file_name = $file['name'] . $increment . $file['ext'];
}
Just don’t be tempted to do it client-side with JavaScript…