Help with Code Pano6

May I please ask for help with a code error in Pano6. This is a code you gave me long ago and it still works great with one exception. If the file is named “Room F1009” all is good, but if the file is named “Room F-1009” it stops. I can repeat the error. The “dash” in the name keeps it from working. Is there an adjustment that will allow the “dash”

Thank you for the help.

Field “A”

fileglobal thefiles, thefolder, tic
thefolder=folderpath(info(“desktopfolder”) )
thefiles=listfiles(pathid(folderpath(info(“desktopfolder”) )+“FileImport”),"")

Field “A"
If listfiles(pathid(folderpath(info(“desktopfolder”) )+“FileImport”),””)≠""
opentextfile “+”+thefolder+“FileImport:”+array(thefiles,tic,¶)
movefile thefolder+“FileImport:”+array(thefiles,tic,¶),
until tic=0

Where does it stop? Does the opentextfile take place?

I tried naming a file “Room F-1009” and doing a movefile on it. It worked without any issues.

It stops at the line that begins with “movefile”. It does import the text but will jump past the “thefolder” line to “until tic”. The file does not move to the next folder. It will step through correctly if there is no dash.