Solution: Opening 15+ files, or multiple file types, simultaneously in Vista

Posted: 10-17-2008, 09:06 PM

The system shell for Windows Vista has been purposely built by Microsoft
such that ...


- 1. When files of various types are selected simultaneously, the
option to open them is made inaccessible to the system shell, whether
through their context menu or the keyboard (i.e., pressing {Enter}).
This is governed by file extensions, not by the program handling the
files (e.g., it occurs when *.doc and *.docx files are simultaneously
selected).

- 2. When more than 15 (i.e., 16 or more) files of the same type are
selected, the same event occurs.

This is documented by Zack Robinson, a Microsoft senior developer, in
the post 'Opening multiple files - Page 2 - Vista Forums'
(http://tinyurl.com/5ozwv7).

Here's a workaround that solves both problems and places the solution
in the context menu.

It requires only creating a Visual Basic script and creating a shortcut
to it in the Send To folder.

2
- 1. Create or download (rename its extension to *.vbs) the script
attached to this post (code posted below):


Code:
--------------------
on error resume next

nl=vbcrlf
wait=200

set shell=wscript.createobject("wscript.shell")
set filesystem=createobject("scripting.filesystemobjec t")

set scriptfile=filesystem.getfile(wscript.scriptfullna me)

stamp=scriptfile.datelastmodified
stamparray=split(year(stamp)&"."&month(stamp)&"."& day(stamp)&"."&hour(stamp)&"."&minute(stamp)&"."&s econd(stamp),".")
version=stamparray(0)
for loopversion=1to ubound(stamparray)
versionlength=len(stamparray(loopversion))
if versionlength<2 then stamparray(loopversion)=string(2-versionlength,"0")&stamparray(loopversion)
version=version&"."&stamparray(loopversion)
next

set contents=filesystem.opentextfile(wscript.scriptful lname,1)
contents=split(contents.readall,nl)

unit=4^5

set files=wscript.arguments
if files.count<1 then
do
wait=inputbox(nl&nl&"Set a period, in milliseconds, to wait while files open:",filesystem.getbasename(scriptfile)&" v"&version&" : "&int(scriptfile.size/unit)&"k"&(scriptfile.size/unit-int(scriptfile.size/unit))*unit&"b : "&ubound(contents)&" lines",wait)
if wait=empty then wscript.quit
if isnumeric(wait) then exit do
loop
set scriptfile=filesystem.createtextfile(wscript.scrip tfullname)
for loopcontents=0to ubound(contents)
newline=contents(loopcontents)
if instr(newline,"wait=")>0 and isnumeric(replace(newline,"wait=","")) then newline="wait="&wait
scriptfile.write(newline)
if loopcontents<ubound(contents) then scriptfile.write(nl)
next
else
for each file in files
shell.run """"&file&""""
wscript.sleep wait
next
end if
--------------------


- 2. Create a shortcut to it and place the shortcut in your Send To
folder. If you can't find your Send To folder, press Windows+R and
run "shell:sendto".

Now, when you right-click on a file or files, choosing the (for
example) "0_file_execution" entry in the Send To list will open all
selected files.

Running the script directly, instead of passing it files as arguments
from the Send To list item, allows you to set the amount of time that
separates the opening of each file; if you set this value too low, Vista
may fail to open all files.


+-------------------------------------------------------------------+
|Filename: 0_file_execution.txt |
|Download: 101 |
+-------------------------------------------------------------------+

--
ananda6359
Posted via http://www.vistaheads.com

Solution: Opening 15+ files, or multiple file types, simultaneously in Vista


Responses to "Solution: Opening 15+ files, or multiple file types, simultaneously in Vista"

ananda6359
Guest
Posts: n/a
 
Solution: Opening 15+ files, or multiple file types, simultaneously in Vista
Posted: 10-17-2008, 09:06 PM

The system shell for Windows Vista has been purposely built by Microsof
such that ...


- When files of various types are selected simultaneously, the optio
to open them is made inaccessible to the system shell, whether throug
their context menu or the keyboard (i.e., pressing {Enter}). This i
governed by file extensions, not by the program handling the file
(e.g., it occurs when *.doc and *.docx files are simultaneousl
selected).

- When more than 15 (i.e., 16 or more) files of the same type ar
selected, the same event occurs.

This is documented by Zack Robinson, a Microsoft senior developer, i
the pos
http://www.vistax64.com/vista-music-...tml#post749024.

Here's a workaround that solves both problems and places the solutio
in the context menu.

It requires only creating a Visual Basic script and creating a shortcu
to it in the Send To folder.

2
- Create or download the script attached to this post (code poste
below):


Code
-------------------
on error resume next

nl=vbcrlf
wait=200

set shell=wscript.createobject("wscript.shell")
set filesystem=createobject("scripting.filesystemobjec t")

set scriptfile=filesystem.getfile(wscript.scriptfullna me)

stamp=scriptfile.datelastmodified
stamparray=split(year(stamp)&"."&month(stamp)&"."& day(stamp)&"."&hour(stamp)&"."&minute(stamp)&"."&s econd(stamp),".")
version=stamparray(0)
for loopversion=1to ubound(stamparray)
versionlength=len(stamparray(loopversion))
if versionlength<2 then stamparray(loopversion)=string(2-versionlength,"0")&stamparray(loopversion)
version=version&"."&stamparray(loopversion)
next

set contents=filesystem.opentextfile(wscript.scriptful lname,1)
contents=split(contents.readall,nl)

unit=4^5

set files=wscript.arguments
if files.count<1 then
do
wait=inputbox(nl&nl&"Set a period, in milliseconds, to wait while files open:",filesystem.getbasename(scriptfile)&" v"&version&" : "&int(scriptfile.size/unit)&"k"&(scriptfile.size/unit-int(scriptfile.size/unit))*unit&"b : "&ubound(contents)&" lines",wait)
if wait=empty then wscript.quit
if isnumeric(wait) then exit do
loop
set scriptfile=filesystem.createtextfile(wscript.scrip tfullname)
for loopcontents=0to ubound(contents)
newline=contents(loopcontents)
if instr(newline,"wait=")>0 and isnumeric(replace(newline,"wait=","")) then newline="wait="&wait
scriptfile.write(newline)
if loopcontents<ubound(contents) then scriptfile.write(nl)
next
else
for each file in files
shell.run """"&file&""""
wscript.sleep wait
next
end i
-------------------


- Create a shortcut to it and place the shortcut in your Send T
folder. If you can't find your Send To folder, press Windows+R an
run "shell:sendto".

Now, when you right-click on a file or files, choosing the (fo
example) "0_file_execution" entry in the Send To list will open al
selected files.

Running the script directly, instead of passing it files as argument
from the Send To list item, allows you to set the amount of time tha
separates the opening of each file; if you set this value too low, Vist
may fail to open all files

+-------------------------------------------------------------------
|Filename: 0_file_execution.vbs
|Download: http://www.vistax64.com/attachment.p...achmentid=7358
+-------------------------------------------------------------------

--
ananda6359
 
LinkBack Thread Tools Display Modes
 


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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you open multiple files of different file types in Windows ... Guest Windows Vista 0 06-16-2008 03:01 AM
How can I play files types with rm or ram file extensions? Liff Windows XP Video 1 01-10-2005 12:56 AM
Opening Multiple files in PS 7 on OSX Jeffrey_D_Graber@adobeforums.com Mac Photoshop 1 05-25-2004 12:47 PM
Opening 2 or more files simultaneously in Excel or Word Lothar Windows XP 2 07-30-2003 04:21 PM
Opening multiple Excel or Word files simultaneously Nancy Stokes Windows XP 0 07-29-2003 08:21 PM