I don't think PS has an option to save back-ups. The thing to do is write a script that'll save a new copy of the file when run (for example filename(timestamp).psd), and then have your save shortcut (ctrl+s, for example) point to that script instead of the normal save. Or have a special hotkey for it and get used to using that.
Files get corrupted, there's no helping that. The best you can do is save backups.
I don't practice good saving discipline myself, oops.
Here's a saving script. Saves a copy of the open file as a PSD with an ugly version of the timestamp attached (yyyymmddhhmmss (e.g. "20110615001353" for June 15, 2011, 00:13:53), the point is to just have an ever-increasing unique file name.
This will clog up your HD pretty fast if you're working with big files and save often, however. I don't actually recommend using it too freely. And of course, you'll need to delete any unneeded copies by hand.
- Code: Select all
var begDesc = "$$$/JavaScripts/SaveCopy/Description=Saves a copy of the current file. Aimed at making backups." // endDesc
try {
// Gets info about the document. Neato.
var data = GetDataFromDocument( activeDocument );
var psdSaveOptions = new PhotoshopSaveOptions();
psdSaveOptions.embedColorProfile = true;
psdSaveOptions.maximizeCompatibility = true;
// If extensions are enabled by the user, then do not add an extension
var extension = '.psd';
if ( "" == data.extension ) {
extension = "";
}
// Get the system date, convert it to local time using standard library functions, and add any leading 0s
var date = new Date()
month = date.getMonth()+1;
if (month < 10)
month = '0' + month;
day = date.getDate();
if (day < 10)
day = '0' + day;
hours = date.getHours();
if (hours < 10)
hours = '0' + hours;
mins = date.getMinutes();
if (mins < 10)
mins = '0' + mins;
secs = date.getSeconds();
if (secs < 10)
secs = '0' + secs;
var timestamp = date.getFullYear() +'' + month + '' + day + '' + hours + '' + mins + '' + secs;
// Rearrange/edit the previous line to obtain the exact date format you want. The year isn't padded.
// The default is yyyymmddhhmmss. It is not advisable to reduce the precision as that will cause files to overwrite.
// Saves a new JPG file with the settings and timestamp defined above
activeDocument.saveAs( File( data.folder +
'/' +
data.fileName + '_'+ timestamp +
extension ), psdSaveOptions, true );
} // try end
catch( e ) {
/*if ('' == data.folder)
alert( "Document is not saved, cannot get path info." );
else*/
alert( "Unable to get document data" );
}
///////////////////////////////////////////////////////////////////////////////
// Function: GetDataFromDocument
// Usage: pull data about the document passed in
// Input: document to gather data
// Output: Object containing folder, fileName, fileType, extension
// NOTE: This function is stolen from an official Adobe Systems script.
///////////////////////////////////////////////////////////////////////////////
function GetDataFromDocument( inDocument ) {
var data = new Object();
var fullPathStr = inDocument.fullName.toString();
var lastDot = fullPathStr.lastIndexOf( "." );
var fileNameNoPath = fullPathStr.substr( 0, lastDot );
data.extension = fullPathStr.substr( lastDot + 1, fullPathStr.length );
var lastSlash = fullPathStr.lastIndexOf( "/" );
data.fileName = fileNameNoPath.substr( lastSlash + 1, fileNameNoPath.length );
data.folder = fileNameNoPath.substr( 0, lastSlash );
data.fileType = inDocument.fullName.type;
return data;
}
I tend to save my files every couple of minutes, so I'd run out of room too quickly. I just... save and hope it doesn't get corrupted =_=
Busy, busy.