I need to surround the filenames with quotes in order to put them in an input box. How can I do this?
When I run the following it gives me the names of the files but I have tried several ways to add leading and trailing quotations on the filenames without luck.
GetFileList>c:\test\*.*,files
Separate>files,,file_names
MessageModal>files
Which would give me something like: c\test\file_1.txt;c\test\file_2.txt;c\test\file_3.txt;
I need it to be "c\test\file_1.txt" "c\test\file_2.txt" "c\test\file_3.txt"
Any help would be greatly appreciated.
Add quotes to filenames
Moderators: JRL, Dorian (MJT support)
Re: Add quotes to filenames
Something like this should work for you. Note that there is a semicolon as the "delimiter" parameter for the separate> function because that is the default output of the GetFileList> function.
Code: Select all
GetFileList>c:\test\*.*,files
Separate>files,;,file_names
Let>kk=0
Repeat>kk
Add>kk,1
Let>value=file_names_%kk%
Let>Value="%value%"
MDL>value
Until>kk=file_names_count
Re: Add quotes to filenames
This worked. Thank you very much