need macro to generate text files

I have a plain text file which I need to, on a daily basis, convert into several additional versions. The document(s) contains setting for systems and I need to have three versions, all derived from the master.

Ideally I need an automated process (macro?) run each morning at 3AM and generate the other versions.

I have a folder (Settings) in which the .txt file exists (settings.txt). I need the following changes to be made to 'auto-generate' two additional variants (settings2.txt and settings3.txt) from it. So, the folder will at all times have a settings, settins2 and setting3 file within it, with settings2 and settings3 re-generated each morning from the settings file that exists when the macro runs.

The changes, to keep it simply, are to take the settings.txt file and make several replacements. For example, replace all instance of 'Apple' with 'Pear', 'Dog' with 'Cat' and 'House' with 'Car'. The different file versions are used by different systems that share settings but need to be in a different format, hence the need to make changes.

Probably more information than is needed but in case the replacements above confuse. A real example is that in settings.txt there are MANY lines that read 'feed=2,5,F,' and they need to be switched out in settings2.txt to be 'feed=3,2,G,' and in settings3.txt to 'feed=1,2,F,'. Hope that helps.

Is there a system (maybe even inherent within Window 7?) that will auto-generate these text files for me or a 3rd party product etc?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

perl -pe "s/Apple/Pear/g; s/Dog/Cat/g; s/House/Car/g;" <  settings.txt > settings2.txt

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ccapitalAuthor Commented:
Sorry but this really isn't clear to me. How will this run on an automated basis and where/how do I enter this command?

I am running Windows 7 OS. Is an add-on needed?
ccapitalAuthor Commented:
Actually, a little legwork and I see now what to do. Installed Perl and that runs fine. Is there a way I can run a perl command automatically in Windows Scheduler?
ccapitalAuthor Commented:
Managed to get this running via scheduler through a .bat file. Many thanks,
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.