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
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Lee
Lee
Flag of United States of America image

ASKER

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!


Avatar of Lee
Lee
Flag of United States of America image

ASKER

Hello again oBda,

That did it!

Thank you very much.
Scripting Languages
Scripting Languages

A scripting language is a programming language that supports scripts, programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted (rather than compiled). Primitives are usually the elementary tasks or API calls, and the language allows them to be combined into more complex programs. Environments that can be automated through scripting include software applications, web pages within a web browser, the shells of operating systems (OS), embedded systems, as well as numerous games. A scripting language can be viewed as a domain-specific language for a particular environment; in the case of scripting an application, this is also known as an extension language.

30K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo