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.


Delete a no-empty folder from userData

Community Beginner ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

Hello, 

I'm building a photoshop extension, and in some steps, I need to delete a folder from 'userData Folder' by clocking on a button. The folder is not empty so new Folder(path).remove() not worked with me. also, the destination folder contains subFolders and files. I want a script to delete all the main folders from the userData. (as uninstalling a pack if well!). Thanks in advance!

TOPICS
Actions and scripting, How to, Mac, SDK, Windows

Views

61

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 ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

Use system() function to which you can put a command line string to delete folder with given path.

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
Community Beginner ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

Can you please give me a code line example to use it? 

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 ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

LATEST

Use 'Search this community' with "app.system" and read available solutions 😉

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