Opendialog and multiselect

From: Kent Briggs (kbriggs_at_spamcop.net)
Date: 08/20/04


Date: Fri, 20 Aug 2004 01:41:22 GMT

Is it possible to initiate an OpenDialog with multiple file names before
calling Execute? When I call opendialog.execute with the
AllowMultiselect option on, I can of course select multiple files and
they are displayed in the filename box like this:

"filename1" "filename2" "filename3"

And when Execute returns, the filename property contains the first one
and the Files property contains a stringlist with all of the file names.
I want to be able to do this in reverse. If I have those same three
files I want to call Execute and have them listed in the filename box as
before. However, the Files stringlist is readonly so this didn't work:

With opendialog do
begin
   files.clear;
   files.add('filename1');
   files.add('filename2');
   files.add('filename3');
   execute;
end;

and this didn't work either:

opendialog.filename:='"filename1" "filename2" "filename3"';

I have D5.

-- 
Kent Briggs, kbriggs@spamcop.net
Briggs Softworks, http://www.briggsoft.com


Relevant Pages

  • RE: Context Menu & Shell
    ... I have a need to edit the registry to add an item to a context menu. ... have any sample code on how to add this to the registry and then execute an ... > key to signify the filename that has been clicked on. ... if I select multiple file names then the executable given in the ...
    (microsoft.public.dotnet.languages.vb)
  • ForEach Loop, getting filename - help?
    ... OK - I'm trying to loop through all the *.txt files in a certain ... filename as an argument to the executable. ... page, I created a new variabe, and saved it. ... calling the executable in the execute process task. ...
    (microsoft.public.sqlserver.dts)
  • Weird Error on this SP
    ... Iīve got the SP below that dinamically generates a filename to load its ... content into a table by using a bulk insert into a table. ... but if I execute only the SPīs content Itīs executed correctly. ... -- example to execute the store procedure ...
    (microsoft.public.sqlserver.programming)
  • Re: Regarding execute restore database in dts
    ... OK how do you intend to pass in the filename to the Global Variable? ... Once you have the filename in the variable you can use this article to execute it in an ExecuteSQL task ... database from that file. ... I can get that file name from globle variable then execute restoration ...
    (microsoft.public.sqlserver.dts)
  • Re: Download Manager Query
    ... add a "" to the end of the filename and before any extension. ... execute it. ... I would like to execute the last downloaded file instead of ...
    (Ubuntu)