GetFileList> Does Not Return An Alphabetical Listing
Does Anyone Know How To Have GetFileList> Return An Alphabetical Listing?
Let>APP_TITLE=Acct Rec Tool
Label>Start
ResetDialogAction>NOC_Completion_Email
CloseDialog>NOC_Completion_Email
Day>the_day
Month>the_month
Year>the_year
Let>Info=%the_day%/%the_month%/%the_year%
Dialog>NOC_Completion_Email
Caption=NOC Completion Email
Top=0
Width=185
Left=0
Height=434
Label=Date,8,8
Label=Ticket Number,8,48
Label=Confirmation Number,8,88
Label=Site ID,8,128
Label=Username,8,168
Label=Plan,8,208
Label=ESN,8,248
Label=Service Type,8,288
Edit=Date_Field,8,24,161,%Info%
Edit=Ticket_Field,8,64,161,
Edit=Confirmation_Number_Field,8,104,161,
Edit=Site_ID_Field,8,144,161,
Edit=Username_Field,8,184,161,
Edit=Plan_Field,8,224,161,
Edit=ESN_Field,8,264,161,
ComboBox=Service_Type,8,304,161, %CRLF%1 Way Satellite%CRLF%2 Way Satellite
Button=Submit,8,336,73,25,1
Button=Load Files,96,336,73,25,3
Button=Exit,8,368,161,25,2
EndDialog>NOC_Completion_Email
Show>NOC_Completion_Email,result
If>result=2,Exit
If>result=3,Loader
If>result=1,FileCheck
Label>FileCheck
IfFileExists>\\Emfile0009c02\strve-f03$\BFS\SATELLITE\NOC Requests\Bendigo NOC requests\%the_year%\Urgent Account Recs\UrgentAccountRec%the_year%%the_month%%the_day%.csv,WriteFile,CreateFile
Goto>Exit
Label>CreateFile
WriteLn>\\Emfile0009c02\strve-f03$\BFS\SATELLITE\NOC Requests\Bendigo NOC requests\%the_year%\Urgent Account Recs\UrgentAccountRec%the_year%%the_month%%the_day%.csv,resultcreate,Date,Tkt Number,Conf Number,Site ID,Username,Plan,ESN,Error Comment,Service Type,Action Taken / Result
Goto>WriteFile
Label>WriteFile
WriteLn>\\Emfile0009c02\strve-f03$\BFS\SATELLITE\NOC Requests\Bendigo NOC requests\%the_year%\Urgent Account Recs\UrgentAccountRec%the_year%%the_month%%the_day%.csv,resultwrite,%NOC_Completion_Email.Date_Field%,%NOC_Completion_Email.Ticket_Field%,%NOC_Completion_Email.Confirmation_Number_Field%,%NOC_Completion_Email.Site_ID_Field%,%NOC_Completion_Email.Username_Field%,%NOC_Completion_Email.Plan_Field%,%NOC_Completion_Email.ESN_Field%,Creation record has not been received!,%NOC_Completion_Email.Service_Type%
Goto>Loader
Label>Loader
GetFileList>\\Emfile0009c02\strve-f03$\BFS\SATELLITE\NOC Requests\Bendigo NOC requests\%the_year%\Urgent Account Recs\*.csv,file,%CRLF%
Wait>1
Dialog>AccountRecLoader
Caption=Account Rec Loader
Top=0
Width=760
Left=0
Height=515
ListBox=AccountRecFiles,8,8,737,433,%file%
Button=Exit,376,448,75,25,2
Button=Load File,296,448,75,25,1
EndDialog>AccountRecLoader
Show>AccountRecLoader,AccountRecLoaderResult
If>AccountRecLoaderResult=2,Exit
If>%AccountRecLoader.AccountRecFiles%,OpenFile
Label>OpenFile
ExecuteFile>%AccountRecLoader.AccountRecFiles%
Goto>Exit
Label>Exit
GetFileList> Does Not Return An Alphabetical Listing
Moderators: Dorian (MJT support), JRL
- CyberCitizen
- Automation Wizard
- Posts: 723
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
- CyberCitizen
- Automation Wizard
- Posts: 723
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
- CyberCitizen
- Automation Wizard
- Posts: 723
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
Michael,
No, I don't think Getfilelist will give you an alphabetized list. However, you can work around it with DOS.
your concise eloquent line:
GetFileList>\\Emfile0009c02\strve-f03$\BFS\SATELLITE\NOC Requests\Bendigo NOC requests\%the_year%\Urgent Account Recs\*.csv,file,%CRLF%
can be replaced by the cumbersome but workable:
let>RP_WAIT=1
Let>RP_WINDOWMODE=2
Run>cmd /c dir \\Emfile0009c02\strve-f03$\BFS\SATELLITE\NOC Requests\Bendigo NOC requests\%the_year%\Urgent Account Recs\*.csv /on /b > c:\~dirlist~
Readfile>c:\~dirlist~,file
DeleteFile>c:\~dirlist~
The "/on" in the DOS "dir" command will give you an alphabetized list of file names. If you want to know other options go to a DOS prompt and type DIR /? and press return. for example you can sort by date or reverse order date or reverse order alphabetized or you can get only directory names or reverse order alphabetized directory names. Lots of options.
Hope this helps,
Dick
No, I don't think Getfilelist will give you an alphabetized list. However, you can work around it with DOS.
your concise eloquent line:
GetFileList>\\Emfile0009c02\strve-f03$\BFS\SATELLITE\NOC Requests\Bendigo NOC requests\%the_year%\Urgent Account Recs\*.csv,file,%CRLF%
can be replaced by the cumbersome but workable:
let>RP_WAIT=1
Let>RP_WINDOWMODE=2
Run>cmd /c dir \\Emfile0009c02\strve-f03$\BFS\SATELLITE\NOC Requests\Bendigo NOC requests\%the_year%\Urgent Account Recs\*.csv /on /b > c:\~dirlist~
Readfile>c:\~dirlist~,file
DeleteFile>c:\~dirlist~
The "/on" in the DOS "dir" command will give you an alphabetized list of file names. If you want to know other options go to a DOS prompt and type DIR /? and press return. for example you can sort by date or reverse order date or reverse order alphabetized or you can get only directory names or reverse order alphabetized directory names. Lots of options.
Hope this helps,
Dick
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact: