GetFileList: I cant read the list

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
A1_UltiMA
Newbie
Posts: 1
Joined: Fri Sep 10, 2010 9:15 am

GetFileList: I cant read the list

Post by A1_UltiMA » Sun Sep 19, 2010 12:45 am

This script promts the user to input a folder directory, and then uses GetFileList to list the files within that folder... But I can't seem to get the message box to show me the list! Please can somebody critisise my script to fix this?

//allows user to browse for folder with buttons rather than type
Let>INPUT_BROWSE=2

//promts user to select desired folder
Input>folder,Select the folder containing the FASTQ files,

//gets list of files as "strFileList" with ";" as the delimiter
GetFileList>folder,strFileList,;

//shows the list
Message>strFileList


//Tested output yeilds an empty message box



Thanks so much for reading and helping me out

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Sun Sep 19, 2010 3:26 am

Help for GetFileList> wrote:GetFileList returns a list of the files found matching the specified filespec. For instance, to return the list of files in the temp directory specify c:\temp\*.* as the filespec.
You need to add a file specification to the GetFileList> "File Spec" parameter.

Since your "folder" varable will not be the sole part of the parameter, it will need to have percents around it. Since the path created by the Input function does not include a trailing backslash we will also need to add that. So the "File Spec" parameter will look something like:

%folder%\*.*

Code: Select all

//allows user to browse for folder with buttons rather than type
Let>INPUT_BROWSE=2
//promts user to select desired folder
Input>folder,Select the folder containing the FASTQ files
//gets list of files as "strFileList" with ";" as the delimiter
GetFileList>%folder%\*.*,strFileList,;

//shows the list
Message>strFileList

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts