Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Do not post in a thread that is not related to your issue, instead create new thread.

Explorer ,
Aug 07, 2021 Aug 07, 2021

Copy link to clipboard

Copied

your work on script is appricited many peoples and helped a lot very impressive work from your side please give countiues with this type of great work.your work is impresive  

 

it that possible to creat a file like jpeg or psd with script with date and time folder?

can i add jpeg or psd file by this script? and if yes then please mention it or explain how

TOPICS
Actions and scripting

Views

166

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 08, 2021 Aug 08, 2021

Copy link to clipboard

Copied

I changed the script for myself to do a xcopy to include the workspaces folders.  I have no idea what jpeg or PSD files you would want to include.  When you save a Jpeg the file should be dated the day and time you did the save, Save As or Create a Copy. Into the folder you specify.  The script created a new folder  with the current date timed in the folder name for each backup copy  for Photoshop version. I believe all I change was the DOS copy command to  a xcopy command with settings to include sub folders.. The script creates the Now folders path for the backup  xcopy first thing, The DOS batch Xcopy command copies the current running Photoshop application  Preferences folder into the created backup folder creatd by the script.  Adobe has alsi noe added additiobal foldets into Photoshop preferences for "Sky_Presets" and "web-cache-temp".  So the get backup with the Xcopy. I have not looked at Stephen script that also supports Mac.

 

var makeFolder =  new Folder('~/Desktop/PsPreferences');
makeFolder.create(); // make sure the folder 
var makeFolder = new Folder(makeFolder + "/" + app.version);					
makeFolder.create(); // make sure the folder 
var now = timeStamp();
var makeFolder = new Folder(makeFolder + "/" + now );					
makeFolder.create(); // make sure the folder 

var Preferences =  new Folder(app.preferencesFolder);

var current = convertPath(Preferences);
var backup = convertPath(makeFolder);
//alert('Copy "' + current + '" "'  + backup + '"'); 
var batch_file = new File(Folder.temp + "/CpyPsPref.bat");
batch_file.open("w");
batch_file.write('XCopy "' + current + '" "'  + backup + '" /E'); 
batch_file.close;
batch_file.execute();
alert("PS " + app.version + " Preferences " + now);

function  convertPath(location) {
	str = String(location);
	if (str.indexOf("~") != -1 ) str = str.substr(str.indexOf("~") + 1 ,);
	while (str.indexOf("%20") != -1 ) {	
		before = str.substr(0, str.indexOf("%20")) + " ";
		after = str.substr(str.indexOf("%20") + 3 ,);
		str = before + after;
	}
 	var path = "c:\\Users\\" +$.getenv("username");
	while (str.indexOf("/") != -1 ) {	
		path = path + str.substr(0, str.indexOf("/")) + "\\";
		str = str.substr(str.indexOf("/") + 1 ,);
	}
	return path + str;
}

function timeStamp(){

	// Get the time and format it
	var digital = new Date();
	var hours = digital.getHours();
	var minutes = digital.getMinutes();
	var seconds = digital.getSeconds();
	var amOrPm = "AM";
	if (hours > 11) amOrPm = "PM";
	if (hours > 12) hours = hours - 12;
	if (hours == 0) hours = 12;
	if (minutes <= 9) minutes = "0" + minutes;
	if (seconds <= 9) seconds = "0" + seconds;

	// Get the date and format it
	var date = new Date();
	var d  = date.getDate();
	var day = (d < 10) ? '0' + d : d;
	var m = date.getMonth() + 1;
	var month = (m < 10) ? '0' + m : m;
	var yy = date.getYear();
	var year = (yy < 1000) ? yy + 1900 : yy;
	
	// create a variable with the fully formatted the time and date
	// todaysDate = hours + ":" + minutes + ":" + seconds + " " + amOrPm + " - " + day + "/" + month + "/" + year;
	// todaysDate = hours + ":" + minutes + ":" + seconds + " " + amOrPm + " - " + month + "/" + day + "/" + year;

	MonthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");

	todaysDate = hours + "-" + minutes + "-" + seconds + " " + amOrPm + " " + MonthNames[date.getMonth()] + " " + date.getDate() + ", " + year;

        return todaysDate;
}

 

A Photoshop  Script can create a dated folder like the scripts and saver jpeg and psd files into it.  This script used an external DOS Batch file it created in temp space to copy preferences into the dated folder.

 

 

My Script does create dated folders.  Scripts can save  PSD and Jpeg  files into folder it creates. The script can also copy file into the dated folders. To Save PSD and Jpeg files there needs open documents that can be saved. Script can open  docuents and create new documents to be saved.

 

Here the full Path path I created  root on users desktop,  Photoshop versisn Sub Folder. Backup Versions Folder.

 

var makeFolder =  new Folder('~/Desktop/PsPreferences');
makeFolder.create(); // make sure the folder 
var makeFolder = new Folder(makeFolder + "/" + app.version);					
makeFolder.create(); // make sure the folder 
var now = timeStamp();
var makeFolder = new Folder(makeFolder + "/" + now );					
makeFolder.create(); // make sure the folder 

 

JJMack

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 08, 2021 Aug 08, 2021

Copy link to clipboard

Copied

@nirmohi photoa art 

 

Are you simply looking for a way to save multiple versions with a unique date/time stamp, a backup of work in progress?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 22, 2021 Aug 22, 2021

Copy link to clipboard

Copied

yes sr

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 23, 2021 Aug 23, 2021

Copy link to clipboard

Copied

LATEST

The Image Processor  Photoshop Scripts will not save over and existing file they will add version sequence number to the current Document Name for the File Name they will save a  version instead of overwriting an existing file.  The menu File>Automate>Image Processor Pro... script is a Photoshop Plug-In script that you can record in and action to save and version of the document you are currently editing to save a version of your work.  So you can Record an Action Set to save the image File types version of the document your editing. In Addition can add a Date to the document Name  so  you can  add Date to the version  you save.  You can assign a F key shortcut to make it easy toe use the recorded action for the version file type you want to save. There will be no dialog displayed when the Actions are used. You only use that recording the single action step for each file type version you want.

Capture.jpg

JJMack

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 08, 2021 Aug 08, 2021

Copy link to clipboard

Copied

@nirmohi photoa art 

 

Looks like the moderators have moved your post to a new, separate topic:

 

Do not post in a thread that is not related to your issue, instead create new thread.

 

Please post in that new topic, thanks.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 08, 2021 Aug 08, 2021

Copy link to clipboard

Copied

if i make a mistake i am sorry

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 15, 2021 Aug 15, 2021

Copy link to clipboard

Copied


@nirmohi photoa art wrote:

if i make a mistake i am sorry



Posting a different topic at the end of an old, different topic is discouraged, which is why a moderator split off your post to new topic thread.

 

Can you explain exactly what you would like help with?

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines