Getfilelist question

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Getfilelist question

Post by kpassaur » Fri Jan 14, 2005 12:30 pm

Does the Getfilelist command support the command switches that are available to the DOS dir command? Such as attributes? I have a script that processes files in a folder and it appears that it reads the name before the file is completely created. I could rewrite the script to use the DOS Directory command to create a text file and process the text file; however, if the Getfilelist command supports the switches it would be easier.

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Jan 14, 2005 5:13 pm

kpassaur,
As far as I know, GetFileList does not support anything like the DOS command line switches that you can use with the DIR command. GetFileList also does not provide directory names. However, using the following code, you can circumvent this minor deficiency. It sounds like you already know what to do you're just trying to find an easier way. I don't think there is one.

//delete these files first in case they got left behind previously
DeleteFile>batfile.bat
DeleteFile>tempfile

Writeln>batfile.bat,result,dir c:\path\*.* [appropriate switches] > tempfile
Let>RP_WAIT=1
Let>RP_WINDOWMODE=2
Run Program>batfile.bat
DeleteFile>batfile.bat

Let>k=0
Label>startread
Let>k=k+1
Readln>tempfile,k,line
If>line=,startread
If>line=##EOF##,endread
If>line=##NOFILE##,endread

//Process variable line

goto>startread

Label>endread
DeleteFile>tempfile
//On with the show....


Hope this helps,
Dick
==================================================================================
---------------------------------------------------------------------------------------------------------------------
==================================================================================

TopicQty:;7TopicQty:;

Special characters work except for @. Use (at) if you want an @ character.

Topic1:; Code Sample Topic1:;
Topic2:; Song Lyric Topic2:;
Topic3:; Useful Information Topic3:;
Topic4:; Best Practice Topic4:;
Topic5:; Useful Information Topic5:;
Topic6:; Useful Information Topic6:;
Topic7:; Useful Information Topic7:;


Text1:; LET>HAPPY HOLIDAYS=365 DAYS OF THE YEAR Text1:;
Text2:; THERE WILL BE AN ANSWER LET>IT=B Text2:;
Text3:; PROGRAMMER / USER CONVERSATIONS ARE CALLED DIALOGS Text3:;
Text4:; USE MULTICHARACTER VARIABLES WHENEVER POSSIBLE TO PREVENT ERRORS Text4:;
Text5:; BEST HELP ON THE INTERNET? MACRO SCHEDULER FORUM Text5:;
Text6:; MOST VALUABLE TOOLS? THE INTERNET AND MACRO SCHEDULER Text6:;
Text7:; MACRO SCHEDULER, AUTOMATING PROCESSES BEFORE RPA WAS INVENTED Text7:;

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