Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Finding Files
#1
Code:
Copy      Help
Dir d; str sPath
str x="c:\smithdr\200609*.txt"
str y
foreach(d x FE_Dir 0x4)
    sPath=d.FileName(1)
    y.from(y sPath); err
out y

What I get as a result is one long string:

Code:
Copy      Help
c:\smithdr\20060910.txtc:\smithdr\20060911.txt

What I need is to insert [] between the file names:
Code:
Copy      Help
c:\smithdr\20060910.txt[]c:\smithdr\20060911.txt

How do I fix this Sad
#2
do this.

,y.from(y "[]" sPath); err
An old blog on QM coding and automation.

The Macro Hook
#3
Almost there but not yet. I need the string to look exactly like this, including the open and close quotes:

Code:
Copy      Help
"c:\smithdr\20060910.txt[]c:\smithdr\20060911.txt"

not a physical hard return Tongue
#4
Use escape sequence [91] instead of [. Or, even easier, 2 strings: "[" "]".
#5
Thanks so much!!!


Forum Jump:


Users browsing this thread: 1 Guest(s)