Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Batch File - Replace old version

$
0
0

I have a Word document that I have created which contains several macros. This file is copied by other employees into different folders on the file server for them to use.  I often make admentments to the master copy and have to email this to everyone asking them to replace their versions with the latest.  This often doesn't happen meaning they are using an old version which can cause issues.

What I am trying to do is create a batch file that I can run overnight that will search the file server (basically every folder and subfolder where the batch file is created - nothing higher) looking for an old version and replace it with a new version.  The file name contains the version.

I have been using the below but it does not seem to be working. 

for /F "tokens=*" %%P in ('dir /b /s "Menu v1.9.docm') do copy /Y .\"Menu v1.10.docm" "%%P"
@Pause

This is not something I have written myself as I don't normally write batch files.

Can anyone help?


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>