• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Create folders in destop "Help Me"

New Here ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

Hi guys

I want create folder name "Save" in destop

in this folder inside i want to seperate folder name "Low res" and "High Res"

less than 800 pixels images i want save low res folder

More then 800 pixels images i want save high res folder

TOPICS
Actions and scripting

Views

1.4K

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

correct answers 1 Correct answer

Community Expert , Mar 28, 2011 Mar 28, 2011

Does this work?

// use at your own risk;

#target photoshop

// the folders;

var saveFolder = createFolder("/Pfaffi 1.5TB/wegwerfen/Save");

var lowFolder = createFolder("/Pfaffi 1.5TB/wegwerfen/Save/Low res");

var hiFolder = createFolder("/Pfaffi 1.5TB/wegwerfen/Save/High Res");

// set to pixels;

var originalRulerUnits = app.preferences.rulerUnits;

app.preferences.rulerUnits = Units.PIXELS;

// define file;

var myDocument = app.activeDocument;

var width = myDocument.width;

var height = myDocument.height;

//

...

Votes

Translate

Translate
Adobe
Community Expert ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

less than 800 pixels images i want save low res folder

More then 800 pixels images i want save high res folder

What exactly do you intend save-wise? Save copy of open files, which format, move the originals …?

The folder-creation should be no problem, this may help you get started:

var theFolder = Folder("~/Desktop/Save");

if (theFolder.exists == false) {

     theFolder.create()

     }

else {};

Votes

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
New Here ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

save tiff format

Votes

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
Community Expert ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

Save as copy, flattened, …?

Votes

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
New Here ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

Hi guys

I want create folder name "Save" in destop

in this folder inside i want to seperate folder name "Low res" and "High Res"

less than 800 pixels images i want save low res folder

More then 800 pixels images i want save high res folder

Save tiff format

save Flatten images

Votes

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
Community Expert ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

This would save as a copy, leaving the layered file unchanged:

tifOpts = new TiffSaveOptions();

tifOpts.embedColorProfile = true;

tifOpts.imageCompression = TIFFEncoding.TIFFLZW;

tifOpts.alphaChannels = false;

tifOpts.byteOrder = ByteOrder.MACOS;

tifOpts.layers = false;

app.activeDocument.saveAs((new File("~/Desktop/Save/Low res/"+app.activeDocument.name+".tif")),tifOpts,true);

As for deciding on your target folder a simple if-clause (dependent on app.activeDocument.width and/or height) should be able to handle it.

Then adjust "~/Desktop/Save/Low res/" for the other case …

Votes

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
New Here ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

how i find out 800 pixel images

i want only save lower than 800 pixels files are saved in low res folder

bigger than 800 pixels images are saved in hires folder

please help me from the begining

Votes

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
Community Expert ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

It’s not much different from other issues that you have asked about previously.

// use at your own risk; 
#target photoshop
// the folders;
var saveFolder = createFolder("~/Desktop/Save");
var lowFolder = createFolder("~/Desktop/Save/Low res");
var hiFolder = createFolder("~/Desktop/Save/High Res");
// set to pixels;
var originalRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
// define file;
var myDocument = app.activeDocument;
var width = myDocument.width;
var height = myDocument.height;
// tif options;
tifOpts = new TiffSaveOptions();
tifOpts.embedColorProfile = true;
tifOpts.imageCompression = TIFFEncoding.TIFFLZW;
tifOpts.alphaChannels = false;
tifOpts.byteOrder = ByteOrder.MACOS;
tifOpts.layers = false;
// if smaller than 800 in both directions;
if (height < 800 && width < 800) {
     myDocument.saveAs((new File(lowFolder+"/"+myDocument.name+".tif")),tifOpts,true)
     }
else {
     myDocument.saveAs((new File(hiFolder+"/"+myDocument.name+".tif")),tifOpts,true)
     };
// reset;
app.preferences.rulerUnits = originalRulerUnits;
////// create folder in not existant //////
function createFolder (thePath) {
     var theFolder = Folder(thePath);
     if (theFolder.exists == false) {theFolder.create()};
     return(theFolder)
     };

Votes

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
New Here ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

Hi c.pfaffenbichler,

This script is Working now

But i have One Problem

when save this images the extention was came like this way

_Y8F2219.jpg (Source image)

_Y8F2219.JPG.tif (Output file)

i dont want .Jpg.tif

i only want

_Y8F2219.tif

this type  of extension

Votes

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
Community Expert ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

You can amend that by for example using »slice« to cut the name.

myDocument.name.slice(0, x)

Just decide on an appropriate way to determine x, either in relation to myDocument.name.length or by the index of (a part of) ».JPG«.

Votes

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
New Here ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

sorry i cant understand this script

pls give me good solution

Votes

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
Community Expert ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

var name = myDocument.name.slice(0,myDocument.name.lastIndexOf("."));
if (height < 800 && width < 800) {      myDocument.saveAs((new File(lowFolder+"/"+name+".tif")),tifOpts,true)      } else {      myDocument.saveAs((new File(hiFolder+"/"+name+".tif")),tifOpts,true)      };

Votes

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
New Here ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

hi

please sorry about disturb You

(Adobe Photoshop.tif) when i rus this script  i have this name

i want source file name whatever is there

i dont want create another name

and extension i need (.tif)

i dont want (.psd.tif, .jpg.tif) like two extension after source name

Votes

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
Community Expert ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

Does this work?

// use at your own risk;

#target photoshop

// the folders;

var saveFolder = createFolder("/Pfaffi 1.5TB/wegwerfen/Save");

var lowFolder = createFolder("/Pfaffi 1.5TB/wegwerfen/Save/Low res");

var hiFolder = createFolder("/Pfaffi 1.5TB/wegwerfen/Save/High Res");

// set to pixels;

var originalRulerUnits = app.preferences.rulerUnits;

app.preferences.rulerUnits = Units.PIXELS;

// define file;

var myDocument = app.activeDocument;

var width = myDocument.width;

var height = myDocument.height;

// tif options;

tifOpts = new TiffSaveOptions();

tifOpts.embedColorProfile = true;

tifOpts.imageCompression = TIFFEncoding.TIFFLZW;

tifOpts.alphaChannels = false;

tifOpts.byteOrder = ByteOrder.MACOS;

tifOpts.layers = false;

// if smaller than 800 in both directions;

if (height < 800 && width < 800) {

     myDocument.saveAs((new File(lowFolder+"/"+myDocument.name.slice(0,myDocument.name.length - 4)+".tif")),tifOpts,true)

     }

else {

     myDocument.saveAs((new File(hiFolder+"/"+myDocument.name.slice(0,myDocument.name.length - 4)+".tif")),tifOpts,true)

     };

// reset;

app.preferences.rulerUnits = originalRulerUnits;

////// create folder in not existant //////

function createFolder (thePath) {

     var theFolder = Folder(thePath);

     if (theFolder.exists == false) {theFolder.create()};

     return(theFolder)

     };

Votes

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
New Here ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

thanks man now its work

Votes

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
Community Expert ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

And I think you owe c.pfaffenbichler a case of wine....

JJMack

Votes

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
Community Expert ,
Mar 28, 2011 Mar 28, 2011

Copy link to clipboard

Copied

LATEST

No thanks to the wine, no big friend of the stuff …

I had hoped sasientry would be able to piece the elements together, therefore I offered them in this fractured fashion … which prolonged the communication somewhat.

Votes

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