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

Windows file dialog - show files

Engaged ,
Jan 31, 2024 Jan 31, 2024

Copy link to clipboard

Copied

I can create a Windows dialog box to select a folder (to process .png images) with this

 

 

var filterFiles = "PNG:*.png"; // I am windows
var inFolder = Folder.selectDialog("Please select FOLDER to process", filterFiles);
if (inFolder != null)
{
  var fileList = inFolder.getFiles(/\.(png)$/i);
}

 

But... how do I get the script to show the dialog that shows all files in it. Like this:

 

GhoulFool_1-1706709343713.png

 

 

 

TOPICS
Actions and scripting , Windows

Views

76

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
LEGEND ,
Jan 31, 2024 Jan 31, 2024

Copy link to clipboard

Copied

LATEST

You can't on Windows. Using the folder select dialog doesn't show files (it does on Mac.)

var a = new File('~/Desktop').openDlg('Select', '*.png');
var b = a.parent;
var c = b.getFiles('*.png');

 

var a = Folder.selectDialog();
var c = a.getFiles('*.png')

 

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