Avatar of Lee
LeeFlag for United States of America asked on

Script to Update/Create Text File with Variable

Hello,


I am looking for a way to update/create a text file that would contain data simulate to the sample below. I have a list of a few hundred file names that would take the place of "file1.btw" all the other data would stay the same. I would like to save each file as a text file that match the file name being inserted. example in this case it would be file1.txt, I not sure how to script something like this out. Any help would be appreciated.


Thanks Lee


%BTW% /AF="\\Server\Template\File1.btw" /D="%Trigger File Name%" /PRN="Printer1" /R=3 /P /C=1
%END%
Item,D1,D2,D3
Item123,Something Awsome,1 Per Box,UPC#






* Script TaskScripting LanguagesPowershell

Avatar of undefined
Last Comment
Lee

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
oBdA

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
Lee

Hello oBda,

Let me give this a try and see what it does, from what I can read on this if you have not nailed it you are very close.

Thx!


ASKER
Lee

Hello again oBda,

That did it!

Thank you very much.
Your help has saved me hundreds of hours of internet surfing.
fblack61