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 > Vista Newsgroups > Vista file management

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

Reply
 
Old 10-17-2008   #1 (permalink)


Windows 98SE
 
 

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

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.

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.
  1. Download 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.filesystemobject")
    
    set scriptfile=filesystem.getfile(wscript.scriptfullname)
    
    stamp=scriptfile.datelastmodified
    stamparray=split(year(stamp)&"."&month(stamp)&"."&day(stamp)&"."&hour(stamp)&"."&minute(stamp)&"."&second(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.scriptfullname,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.scriptfullname)
    			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.

Note that the arguments list is limited in its length to 260 characters; the lengthier the paths of the files you are opening, the fewer files you can open. This is a limitation of the Windows command line, and I'm working on fixing it now.

Attached Files
File Type: txt 0_file_execution.txt (1.6 KB, 48 views)
File Type: vbs 0_file_execution.vbs (1.6 KB, 103 views)

Last edited by ananda6359; 10-20-2008 at 01:33 PM.. Reason: reported 260-character limit
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
How to use measure-object against multiple file types PowerShell
Opening multiple files Vista music pictures video
RE: Solution: Opening 15+ files, or multiple file types, simultaneousl Vista General
Opening Multiple Files w/ Different Extensions Vista performance & maintenance
Opening 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