Computer Hope

Microsoft => Microsoft DOS => Topic started by: Jxshh on November 03, 2018, 01:43:01 PM

Title: Need Help with word Batch File to open multiple Documents
Post by: Jxshh on November 03, 2018, 01:43:01 PM
I wonder if anybody can help me... bit of a long request!

So, I need to open multiple word documents, all located in different folders with different names.

Example:

S:\ASOS\Operations\Service Reviews\2018\11 November 2018\Asos Daily Service Review 04.docx
S:\Bidvest Logistics\Operations\Service Review\2018\11 November 2018\Best Food Daily Service Review 04.docx

I have tried several different commands but had no luck what so ever!

Also, it would be helpful if I could get it to open the document at the bottom of the list. They are changed daily so go Review 04, Review 05, Review 06 so on so forth.

So essentially, something that says:

Go S:\ASOS\Operations\Service Reviews\2018\11 November 2018
Open the bottom word document
Go S:\Bidvest Logistics\Operations\Service Review\2018\11 November 2018\
Open the bottom word document


I know it's a long request but I am stuck and hoping someone can help me! :P

Thanks in Advance!
Title: Re: Need Help with word Batch File to open multiple Documents
Post by: Jxshh on November 03, 2018, 05:48:22 PM
Even if we can just get it to open any of the documents, I can go in and change the numbers manually each time!

Thanks
Title: Re: Need Help with word Batch File to open multiple Documents
Post by: Squashman on November 03, 2018, 07:27:26 PM
Real easy to open a word document with a batch file if the file associations are setup correctly.
Code: [Select]
start "" "S:\ASOS\Operations\Service Reviews\2018\11 November 2018\Asos Daily Service Review 04.docx"
start "" "S:\Bidvest Logistics\Operations\Service Review\2018\11 November 2018\Best Food Daily Service Review 04.docx"
And yes you should use the leading set of empty quotes.

That is pretty much all you can do.  Batch file cannot interact with Graphical User Interface programs.
Title: Re: Need Help with word Batch File to open multiple Documents
Post by: Jxshh on November 03, 2018, 07:31:14 PM
Hmm, strange... I'm 99% sure I had tried this code twice already as I thought the same, it was simple hahah, either way, the code you provided works perfectly.

Thanks for your help, as simple as it was haha! :P
Title: Re: Need Help with word Batch File to open multiple Documents
Post by: Jxshh on November 03, 2018, 08:49:34 PM
Issue Resolved
- Thanks