Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Scripting Guys: I am looking for a PS script to read a text file which has some operational commands which needs to be executed line by line.

$
0
0

Hi,

Really fed up with a manual work and concentrating to automate my work. Your help needed :) .

Summary:

We have some commands which we are executing one by one on PowerShell. The command is like below:

====

.\<application Batch file> -f <.csv file patch>-e UTF-8 -i attributes.ServerId -o "application specific directory" -x -u <user name>

example:

.\satish.bat -f D:\temp\satish\import.csv -e UTF-8 -i attributes.ServerId -o "ORG/INDIA/IN-123" -x -u satish_m

Like the above we have 1000+ commands

====

Description:

We have an application batch file which reads a .csv file and the file content will be dumped in to application specific directory as we specified in the command line.

Here each command is asking for a password of <username>.

My requirement:

I want to create a text / bat file which consists above bunch of command lines.

Script has to execute line by line (note: time will take to complete one command and it is dynamic)

Password should ask only fist time (or) read password from external file every time without manual input.

Please guys help me out on this. I am new to POWERSHELL.

Regards/Satish.M


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>