Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista Tutorial - Select multiple files in dialog box

Reply
 
Old 08-08-2008   #1 (permalink)
Reventlov
Guest


 
 

Select multiple files in dialog box

Hello,
as the drag&drop method has a limit in the number of characters that can be passed as
arguments to a script, I am trying to open a dialog box and ask the user the name of the
files to be renamed.

I tried the open dialog box ("MSComDlg.CommonDialog.1"), but it doesn't work because on a
pc I don't have installed visual studio or any other program that supports the com object.

I'm trying to use IE to display the file-open box <INPUT TYPE="FILE">, but it only allows
one file to be selected.

Is there a way to ask the user for multiple existing files?

Thank you.
Giovanni.
--
Giovanni Cenati (Bergamo, Italy)
Write to "Reventlov" at katamail com
http://digilander.libero.it/Cenati (Esempi e programmi in VbScript)
--

My System SpecsSystem Spec
Old 08-08-2008   #2 (permalink)
Pegasus \(MVP\)
Guest


 
 

Re: Select multiple files in dialog box


"Reventlov" <noone@xxxxxx> wrote in message
news:489af420.111655765@xxxxxx
Quote:

> Hello,
> as the drag&drop method has a limit in the number of characters that can
> be passed as
> arguments to a script, I am trying to open a dialog box and ask the user
> the name of the
> files to be renamed.
>
> I tried the open dialog box ("MSComDlg.CommonDialog.1"), but it doesn't
> work because on a
> pc I don't have installed visual studio or any other program that supports
> the com object.
>
> I'm trying to use IE to display the file-open box <INPUT TYPE="FILE">, but
> it only allows
> one file to be selected.
>
> Is there a way to ask the user for multiple existing files?
>
> Thank you.
> Giovanni.
> --
> Giovanni Cenati (Bergamo, Italy)
> Write to "Reventlov" at katamail com
> http://digilander.libero.it/Cenati (Esempi e programmi in VbScript)
> --
Have a look here:
How Can I Show Users a Dialog Box for Selecting Files?
http://www.microsoft.com/technet/scr...5/hey0301.mspx


My System SpecsSystem Spec
Old 08-08-2008   #3 (permalink)
Reventlov
Guest


 
 

Re: Select multiple files in dialog box

Il giorno Fri, 8 Aug 2008 23:19:20 +0200, "Pegasus \(MVP\)" <I.can@xxxxxx> ha scritto:
Quote:

>
>"Reventlov" <noone@xxxxxx> wrote in message
Quote:

>> Is there a way to ask the user for multiple existing files?
>
>Have a look here:
>How Can I Show Users a Dialog Box for Selecting Files?
>http://www.microsoft.com/technet/scr...5/hey0301.mspx
>
Thanks a lot.
I ignored the existence of UserAccounts. The syntax is similar to msComDlg (but it is
InitialDir instead of InitDir). I will try other flags to see if I can show the window in
win95 style.

Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "VBScript Scripts|*.vbs|All Files|*.*"
objDialog.Flags = &H0200
objDialog.FilterIndex = 1
objDialog.InitialDir = "C:\Scripts"
intResult = objDialog.ShowOpen

If intResult = 0 Then
Wscript.Quit
Else
Wscript.Echo objDialog.FileName
End If



--
Giovanni Cenati (Bergamo, Italy)
Write to "Reventlov" at katamail com
http://digilander.libero.it/Cenati (Esempi e programmi in VbScript)
--
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Select Multiple Files Fix Tutorials
Can't select multiple files in my computer Vista file management
how to select multiple files in Vista Vista General
how to select multiple files in Vista Vista General
I cannot select multiple files Vista file management


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46