Read file list from directory

Moderator: Moderator Group

Read file list from directory

Postby shaggylom » Sat Aug 03, 2013 1:24 am

Hi there I was trying to use Watch Folder to read files from a directory on the computer. realized it just counts files. is there a way to read file names from a directory then apply a filter to only read files with say '.xml' on it and then output that to a list which can then in turn fill in a dropdown box? subsequently those would trigger a custom event I have to load said show?
shaggylom
 
Posts: 2
Joined: Mon Mar 04, 2013 2:10 pm

Re: Read file list from directory

Postby Dennis Kuypers » Mon Aug 05, 2013 10:00 am

Hi,

Use the Watch Folder node with a Script Output node. Create a String Array variable which can hold the file names. For example do
Code: Select all
VArrayGetFileNames,MyFilesArray,C:/somepath
in the script output node to refresh the array. Make the dropdown box display from the variable source.

To get the selected file use a DropDownList Input node

Best regards
Dennis
Dennis Kuypers
(former Product Developer, Software)
Dennis Kuypers
coolux Germany
 
Posts: 771
Joined: Thu Jul 05, 2012 12:18 pm


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 25 guests

cron