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

List with all files in the folder.

Engaged ,
Aug 16, 2019 Aug 16, 2019

Copy link to clipboard

Copied

Hello everyone!

Is there any way to create and save to the desktop a file.txt containing a list with the name of all files in the specific folder with scripts?

Example:

00001.png

00002.png

00003.png

.................

.................

00300.png

Capturar.JPG

Grateful for the help.

TOPICS
Actions and scripting

Views

3.2K

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

Guide , Aug 16, 2019 Aug 16, 2019

Here is an example:-

#target photoshop;

main();

function main(){

var selectedFolder = Folder.selectDialog("Please select  folder");

if(selectedFolder == null) return;

var fileList= selectedFolder.getFiles("*.png");

if(fileList.length>0){

var out = new File(Folder.desktop + "/ListIcons.txt");

out.open("w");

out.encoding="UTF8";

for(var a in fileList){out.writeln(decodeURI(fileList.name));}

out.close();

}

};

Votes

Translate

Translate
Adobe
Guide ,
Aug 16, 2019 Aug 16, 2019

Copy link to clipboard

Copied

Here is an example:-

#target photoshop;

main();

function main(){

var selectedFolder = Folder.selectDialog("Please select  folder");

if(selectedFolder == null) return;

var fileList= selectedFolder.getFiles("*.png");

if(fileList.length>0){

var out = new File(Folder.desktop + "/ListIcons.txt");

out.open("w");

out.encoding="UTF8";

for(var a in fileList){out.writeln(decodeURI(fileList.name));}

out.close();

}

};

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
Engaged ,
Aug 16, 2019 Aug 16, 2019

Copy link to clipboard

Copied

LATEST

Sensational! Worked perfectly.

Thank you SuperMerlin

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