GetFileList> Does Not Return An Alphabetical Listing

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

GetFileList> Does Not Return An Alphabetical Listing

Post by CyberCitizen » Tue Jul 05, 2005 4:35 am

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
FIREFIGHTER

Luciano
Junior Coder
Posts: 31
Joined: Fri Feb 11, 2005 1:10 pm
Location: Ghent, BELGIUM

Post by Luciano » Tue Jul 05, 2005 7:01 am

HI,

Check the syntax of the GETFILELIST.


GetFileList>.......\*.csv,file,%CRLF%. There is no result variable in your script!

GetFileList>filespec,result[,delimiter] . From help file

Hope this helps.

Luciano

Luciano
Junior Coder
Posts: 31
Joined: Fri Feb 11, 2005 1:10 pm
Location: Ghent, BELGIUM

Post by Luciano » Tue Jul 05, 2005 7:06 am

Hi,

Sorry, I was a little bit dreaming. Forget preceding reply.

Luciano

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Tue Jul 05, 2005 10:17 am

Ha Ha Yeah There Is It's In The Dialog Box :D

Any other suggestions?
FIREFIGHTER

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Wed Jul 13, 2005 12:31 am

Anyone Got An Answer For This???
FIREFIGHTER

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

Post by JRL » Wed Jul 13, 2005 3:26 am

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

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Jul 13, 2005 4:44 am

Also consider the DOS SORT command for any file vs. a directory listing.

See SORT /? | more in a Command Window.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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