Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • the batch is working so fine -Thank you- ... but here is my need .. the winword.exe is running so fast .. I need to rename the folder after the winword.exe is fully loaded and the time I choose to close winword.exe it must rename the folder back before it is fully closed.
    – hsawires
    Commented Feb 28, 2015 at 16:34
  • please check my edited question
    – hsawires
    Commented Feb 28, 2015 at 16:50
  • thank you so much ... but it didn't work .. it still wait the program to close then copy the folder. ... but it could work if the batch run without waiting the program to close. something different then CALL and SLEEP for a while then execute the rest of the batch.( don't have to wait the program to close) maybe your first solution work either.
    – hsawires
    Commented Feb 28, 2015 at 17:54
  • No. It copies the folder before it even runs word. You have all of the data. Now you just need to understand your own problem well enough to solve it. This does everything you need. At any point you have two copies: one working copy and one from before you loaded word. It replace the original folder after you close word. Aside from this, your question can only be best solved from outside of a batch file (no matter what it is that you really want) IMHO.
    – krowe
    Commented Feb 28, 2015 at 18:01