Problem with using variables

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Aaron
Pro Scripter
Posts: 113
Joined: Mon Apr 09, 2007 1:35 am
Location: Wyoming

Problem with using variables

Post by Aaron » Sat May 05, 2007 7:14 am

Would someone tell me what I'm doing wrong.

I'm trying to GetFileList, then write it to a file with a line break.

Thanks

Code: Select all

GetFileList>C:\Documents and Settings\Owner\My Documents\Macro Scheduler\*.*,files,0

Separate>files,%CRLF%,file_names

Let>k=1

Label>START

WriteLn>c:\temp\test.txt,result,%file_names%%k%

Let>k=k+1

Goto>START

Label>finish
Aaron

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Sat May 05, 2007 3:39 pm

Is this what you want?

File name and type only

Code: Select all

let>k=0
GetFileList>C:\Documents and Settings\Owner\My Documents\Macro Scheduler\*.*,files
Separate>files,;,file_names

Repeat>k
Let>k=k+1
StringReplace>file_names_%k%,C:\Documents and Settings\Owner\My Documents\Macro Scheduler\,,file_name
WriteLn>c:\temp\test.txt,r,file_name
Until>k,file_names_count
File directory, name and type

Code: Select all

LET>k=0
GetFileList>C:\Documents and Settings\Owner\My Documents\Macro Scheduler\*.*,files
Separate>files,;,file_names

Repeat>k
Let>k=k+1
WriteLn>c:\temp\test.txt,r,file_names_%k%
Until>k,file_names_count

Aaron
Pro Scripter
Posts: 113
Joined: Mon Apr 09, 2007 1:35 am
Location: Wyoming

Works Perfect

Post by Aaron » Sat May 05, 2007 5:38 pm

Thanks Rain, works perfect.
Aaron

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