Update script help

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

MordyT

Thread Starter
Joined
Oct 8, 2007
Messages
48
Hello,
I am trying to write a script that can do a batch update.

Here is the general concept:

C:\Master\Updates\1\ <-- all the files for program 1 are stored in here
C:\Files\1\a <-- a is a copy of the C:\Master\Updates\1 folder with a few customizations.
C:\Files\1\b <-- b is a copy of the C:\Master\Updates\1 folder with a few customizations.
C:\Files\1\c <-- c is a copy of the C:\Master\Updates\1 folder with a few customizations.

So when folder C:\Master\Updates\1\ is updated I want to run this batch file (or whatever lang is chosen) to update all the folders in C:\Files\1\. What it does is copy all the files in C:\Master\Updates\1\ and then applies it to C:\Files\1\a\. Then it repeats with C:\Files\1\b\ and then with C:\Files\1\c\

All this I can script up, the problem I have is the number of folders in C:\Files\1\ and their names change all the time, which means what I really need is a way to generate a list of folders name inside of C:\Files\1\ and save it to a text file (one name per line). The rest I think this script can handle.

for /f %%a in c:Files\1\uplist.txt do xcopy /y/e c:\master\update\1\*.* c:\Files\1\%%a\
pause

If anyone knows how I could get a list of current folder names? Will the script above work for what I need?
 

MordyT

Thread Starter
Joined
Oct 8, 2007
Messages
48
Awesome. That was exactly the code I needed. I did need to mod my code, but it is working now.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top