Skip to main content
亮太中57270486
Participating Frequently
September 16, 2019
Question

Scriptでファイルの一覧を表示する方法

  • September 16, 2019
  • 1 reply
  • 247 views

例えばなんですが、デスクトップに置いてあるファイルの一覧をScriptでalertできますでしょうか?

可能であればCS6.0でも使えるものが知りたいです。

    This topic has been closed for replies.

    1 reply

    Tomas Sinkunas
    Legend
    September 16, 2019

    Totally doable. Here's one way to do that:

    var path = '~/Desktop';
    var folderObject = new Folder(path);
    var folderItems = folderObject.getFiles();
    
    alert(folderItems.join('\n'));

     

    You can read more about Folder object here:http://estk.aenhancers.com/3%20-%20File%20System%20Access/folder-object.html

    亮太中57270486
    Participating Frequently
    September 17, 2019
    You are so cool ! thank you!