NSString *filename = @"/my/original/file/name"; NSString *tildeFilename; tildeFilename = [NSString stringWithFormat: @"%@~", filename]; // remove it first, otherwise the move will fail [defaultManager removeFileAtPath: tildeFilename handler: nil]; // now rename the file [defaultManager movePath: filename toPath: tildeFilename handler: nil];If you want to stick the tidle before the file extension (so the finder could openook~.tiff
), try this:NSString *pathExtension = [filename pathExtension]; if (!pathExtension) { tildeFilename = [filename stringByAppendingString: @"~"]; } else { tildeFilename = [NSString stringWithFormat: @"%@~.%@", [filename stringByDeletingPathExtension], pathExtension]; }(Thanks to Peter Hosey for this one)