Indigo Rose Software

Go Back   Indigo Rose Software Forums > Setup Factory 8.0 > Setup Factory 8.0 Suggestions

Reply
 
Thread Tools Display Modes
  #1  
Old 2 Weeks Ago
SetupJuggler SetupJuggler is offline
Indigo Rose Customer
 
Join Date: Nov 2008
Location: Göttingen, Germany
Posts: 62
SetupData.GetFileList with optional 2nd parameter to filter output

Hi,

I have to run a special file after installing. I know the name, but the destination differs. I know I could use GetFileList and filter my own within script, but the buildin function with an optional filter would be nice.

Code:
table SetupData.GetFileList ( 
 number ListToGet = ARCHIVE_LIST, table FilePropFilter = nil )
Returns all of the file properties, which match to the input filter table FilePropFilter.

FilePropFilter
(table) with the keys to compare with setup. Keys like FileName, Destination, ...

Returns
Same like the existing GetFileList if FilePropFilter equal to nil, a table with all files.

If FilePropFilter is not nil, a numerically indexed table containing information about the file(s) matching FileProp input keys in the setup. Might be size 1 up to all files.

Example:
Code:
-- filter for all files named "FileToFind.ext"
tFileList = SetupData.GetFileList(ARCHIVE_LIST, {FileName="FileToFind.ext"});

if tFileList then
File.Run(SessionVar.Expand(tFileList[1].Destination.."\\"..tFileList[1].FileName) );
end

-- filter for all files named "FileToFind.ext" and residing within path "%AppFolder%\\folder"
tFilePropFilter = {Filename="FileToSearch.ext", Destination=SessionVar.Expand("%AppFolder%\\folder")};
tFileList = SetupData.GetFileList(ARCHIVE_LIST, tFilePropFilter);

if tFileList then
File.Run(SessionVar.Expand(tFileList[1].Destination.."\\"..tFileList[1].FileName) );
end
Best regards,
Udo
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -6. The time now is 08:47 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software