Opening multple files with a batch file

V

vIQleS

I've got a batch file that copies files i nede to my HDD from the network,
and one of them changes name slightly each time. I can copy "blah*.xls" but i
can't open *.* or 'blah*.xls'.

Is there a clever way to do this?

I've been using start, but it doesn't seem to do wildcards, and neither does
excel.exe
 
H

Harlan Grove

vIQleS said:
I've got a batch file that copies files i nede to my HDD from the network,
and one of them changes name slightly each time. I can copy "blah*.xls" but i
can't open *.* or 'blah*.xls'.
....

WAY off topic in this newsgroup, but WTH.

It's Excel that can't handle wildcards. But as long as you don't
include EXCEL in the start commands, you could use multiple start
commands to open separate files in the same Excel application
instance. For example,

for %%f in (blah*.xls) do start %%f

should open all files matching blah*.xls in the working directory in
the same Excel application instance. OTOH,

for %%f in (blah*.xls) do start excel %%f

will launch a separate Excel application instance for each file -
probably neither what you want nor sparing of system resources.
 
Top