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

create a folder in presets/scripts

Advocate ,
Nov 30, 2017 Nov 30, 2017

I would like to create a test folder

in this path

photoshop presets/scripts

I have this piece of code but it's okay

I use photoshop cc2014 and 2017

//Folder to create on the desktop

var folder1 = Folder("~/Presets/Scripts/test");

//Check if it exist, if not create it.

if(!folder1.exists) folder1.create();

TOPICS
Actions and scripting
1.4K
Translate
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

Guide , Nov 30, 2017 Nov 30, 2017

#target photoshop;

var SCRIPTS_FOLDER =  decodeURI(app.path + '/' + localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts"));

var folder1 = Folder(SCRIPTS_FOLDER +"/test");

//Check if it exist, if not create it.

if(!folder1.exists) folder1.create();

if(!folder1.exists) alert("You need to run this script as Administrator\nThe folder was NOT created");

Translate
Adobe
Guide ,
Nov 30, 2017 Nov 30, 2017

#target photoshop;

var SCRIPTS_FOLDER =  decodeURI(app.path + '/' + localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts"));

var folder1 = Folder(SCRIPTS_FOLDER +"/test");

//Check if it exist, if not create it.

if(!folder1.exists) folder1.create();

if(!folder1.exists) alert("You need to run this script as Administrator\nThe folder was NOT created");

Translate
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 ,
Nov 30, 2017 Nov 30, 2017

Make sure you change the permissions on the preset folder as your script may not be able to write to it.

Translate
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
Advocate ,
Nov 30, 2017 Nov 30, 2017

https://forums.adobe.com/people/Chuck+Uebele  ha scritto

Make sure you change the permissions on the preset folder as your script may not be able to write to it.

How should I do to set permissions on the set folder.

Translate
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
People's Champ ,
Dec 01, 2017 Dec 01, 2017
LATEST
Translate
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