Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hey again,
I am looking for a simple batch that I can run nightly to update our forms on all of our server locations. I want them to match server A's folders and subfolders exactly after every run that night. So basically I want it to copy over everything that is in this UNC path's folder and subfolder
\\serverA\fl01\jetform\forms
to all other servers that can be put into another batch or txt file to call the info from (whichever is easier for you) that will contain the server names:
serverB
serverC
serverD
etc.and will replace that variable in the unc path where server A is in xcopying it (with overwriting, and everything being forced, no prompting).
However, I want it to also make sure and run through the files and subfolder(s) and files and make sure that they match exactly that of server A, no more and no less. So if there is file z.pdf and that isn't on serverA i want it to delete that file. Is this possible? Thanks.

I guess that eliminating 'strays' lilke z.pdf is as simple as deleting everything before the xcopy starts.
for /f %%S in (servname.lst) do xcopy \\serverA\fl01\jetform\forms %%S
If at first you don't succeed, you're about average.M2

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |