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

Windows file dialog - show files

Engaged ,
Jan 31, 2024 Jan 31, 2024

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
114
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
Adobe
LEGEND ,
Jan 31, 2024 Jan 31, 2024
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')

 

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