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
GetFileList: I cant read the list
Moderators: JRL, Dorian (MJT support)
You need to add a file specification to the GetFileList> "File Spec" parameter.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.
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