Go Back   TechArena Community > Technical Support > Computer Help > Windows Vista > Vista Help
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , ,

Sponsored Links



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

Vista Help


Reply
 
Thread Tools Search this Thread
  #1  
Old 18-10-2008
Member
 
Join Date: Oct 2008
Posts: 1
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.

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. 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.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.
Attached Files
File Type: txt 0_file_execution.txt (1.6 KB, 281 views)

Last edited by Saket : 24-03-2010 at 08:01 PM. Reason: fixed lists
Reply With Quote
  #2  
Old 08-12-2008
lforbes
 
Posts: n/a
RE: Solution: Opening 15+ files, or multiple file types, simultaneousl

Thanks for this. Does anyone know why Microsoft would hack Vista to do this.
It is SOOOO annoying. Even if the same program is set as default I can't get
multiple ones to open.
Reply With Quote
  #3  
Old 23-03-2010
Member
 
Join Date: Mar 2010
Posts: 1
Re: Solution: Opening 15+ files, or multiple file types, simultaneously in Vista

Oh Joy! This worked perfectly I just opened 38 files with a right click, just like in the good old productive days of XP.
Reply With Quote
  #4  
Old 23-06-2010
Member
 
Join Date: Jun 2010
Posts: 1
Re: Solution: Opening 15+ files, or multiple file types, simultaneously in Vista

Worked great. Would it be possible to open, print, then close multiple excel files with a code similar to this one? Any help with this would be greatly appreciated!
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Vista > Vista Help


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Solution: Opening 15+ files, or multiple file types, simultaneously in Vista"
Thread Thread Starter Forum Replies Last Post
Filling multiple XML files from an XLS file MAHAH Software Development 4 09-12-2009 09:21 PM
Rename multiple file types Preetish Software Development 4 02-04-2009 04:11 PM
WMP Not opening *.wmv files - Vista OS pmh MediaCenter 13 11-02-2009 06:58 AM
Change multiple images simultaneously in a table Abbudin Software Development 3 03-01-2009 03:24 PM
Remove File Extension Associations and Unassociate File Types in Windows Vista Johnny Tips & Tweaks 0 20-06-2008 12:40 PM


All times are GMT +5.5. The time now is 08:32 AM.