Tech Support Guy banner
Status
Not open for further replies.

Modify my Batch file

Solved 
709 views 12 replies 2 participants last post by  managed 
#1 ·
What change do I need run the following bat file so that all 3 files open at once
"C:\users\peter\desktop\A FILES FOR BACKUP\Copy of ROI mid Dec 2011 to 18 October 2011\8 ROI sheet Nov 2017 to Oct 2018.xls"

"C:\Users\peter\Desktop\3 spreadsheets\AGL ESTIMATED BILL.xls"

"C:\Users\peter\Documents\AllData\Dads\Mums Shares\My Budget includes payment to Michael\NEW sheet commenced 10717.xls"
After I open the file holding the batch files they will open individually after each one is closed, and after third one closes the cmd page also needs to be closed
Just need a tweak so that they all open together and the cmd page closes automatically

Tech Support Guy System Info Utility version 1.0.0.4
OS Version: Microsoft Windows 10 Home, 64 bit
Processor: Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz, Intel64 Family 6 Model 58 Stepping 9
Processor Count: 4
RAM: 8071 Mb
Graphics Card: Intel(R) HD Graphics, -1984 Mb
Hard Drives: C: 446 GB (183 GB Free); D: 931 GB (692 GB Free); F: 698 GB (268 GB Free);
Motherboard: Gigabyte Technology Co., Ltd., B75M-D3V
Antivirus: Norton 360, Enabled and Updated
 
#2 · (Edited)
In the batch file try putting START and one space at the beginning of each of those 3 lines.

That should open 3 separate instances of whatever program is set to open .xls files.

If still having problems post the whole Batch file please.
 
#7 ·
Try this, copy and paste the code below into Notepad and save with .cmd extension :-
Code:
@echo off
for %%a in (
"C:\users\peter\desktop\A FILES FOR BACKUP\Copy of ROI mid Dec 2011 to 18 October 2011\8 ROI sheet Nov 2017 to Oct 2018.xls"
"C:\Users\peter\Desktop\3 spreadsheets\AGL ESTIMATED BILL.xls"
"C:\Users\peter\Documents\AllData\Dads\Mums Shares\My Budget includes payment to Michael\NEW sheet commenced 10717.xls"
) do (start "" "%%a")
 
#8 ·
Thanks again Managed.
Did as you suggested and got an error message(attached) when I tried to open the .cmd file containing your code.
I had tried Tools/options/general/ignore other applications, but nothing opened.
This is a real tester.
I might add that before I deleted Excel Launcher.exe command would open all three files and command window would close automatically.
Unfortunately,I cannot find the instructions for running Excel Launcher after installation (which I have done) .
Getting punchy with all my various attempts but I think I need to have a code which incorporates "consoleapplication.exe" and then use that code to enable Excel Launcher to be the default application rather than Excel.
See thread on https://forums.techguy.org/threads/assistance-with-launcher-exe-in-excel-2003.1230228/
This is the error message when I ran your code
Rectangle Handwriting Font Circle Magenta
 

Attachments

#9 ·
It doesn't like the space, try putting 2 x double quotes like this :-
Code:
@echo off
for %%a in (
""C:\users\peter\desktop\A FILES FOR BACKUP\Copy of ROI mid Dec 2011 to 18 October 2011\8 ROI sheet Nov 2017 to Oct 2018.xls""
""C:\Users\peter\Desktop\3 spreadsheets\AGL ESTIMATED BILL.xls""
""C:\Users\peter\Documents\AllData\Dads\Mums Shares\My Budget includes payment to Michael\NEW sheet commenced 10717.xls""
) do (start "" "%%a")
If that doesn't work can you change the the paths and filenames so there are no spaces ?
 
#10 ·
Tried all suggestions and no luck.
Changed the path and put no spaces in everything I could as per
@echo off
for %%a in (""C:\users\peter\desktop\Oneinstancecommand\8ROIsheetNov 2017toOct2018.xls""
""C:\Users\peter\Desktop\Oneinstancecommand\AGLESTIMATEDBILL.xls""
""C:\Users\peter\Desktop\Oneinstancecommand\NEWsheetcommenced10717.xls "") do (start "" "%%a")
Each attempt was rejected and screenshots below show reason Rectangle Font Circle Paper Paper product
Rectangle Font Circle Paper Paper product
Rectangle Font Handwriting Circle Screenshot

Sorry to be a pain and thanks very much for your help
 

Attachments

#11 ·
Managed, Have worked on this all day and am using this command
Start excel "C:\users\peter\desktop\A FILES FOR BACKUP\Copy of ROI mid Dec 2011 to 18 October 2011\8 ROI sheet Nov 2017 to Oct 2018.xls"
"C:\Users\peter\Desktop\3 spreadsheets\AGL ESTIMATED BILL.xls"
"C:\Users\peter\Documents\AllData\Dads\Mums Shares\My Budget includes payment to Michael\NEW sheet commenced 10717.xls"
Now when I run the command the first two (Copy of ROI..abd AGL..) open together with a blank excel sheet.
If I close the blank sheet it is replaced by the third sheet (NEW..)
This is very close to what I need so any suggestions welcome.
Thanks again
 
#12 ·
Finally got it to work
Start excel "C:\users\peter\desktop\A FILES FOR BACKUP\Copy of ROI mid Dec 2011 to 18 October 2011\8 ROI sheet Nov 2017 to Oct 2018.xls""C:\Users\peter\Desktop\3 spreadsheets\AGL ESTIMATED BILL.xls""C:\Users\peter\Documents\AllData\Dads\Mums Shares\My Budget includes payment to Michael\NEW sheet commenced 10717.xls"
I misunderstood your original suggestion re blanks .
Thanks for your help[
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top