New
#1
How to use Powershell for simple CMD tools
I am by no standard a programmer. But in the past, I had a job with a lot of skutwork needed on a daily basis. I.T. was always too busy, and non-I.T. folks were not allowed to do any programming, but the command line and batch stuff was not real programming and was OK for ordinary folks. So, I learned batch, out of necessity over 20 years ago, and became addicted. I would not even dabble with Powershell, except that it has a feature that is frustratingly missing in CMD.exe--Powershell has a command line history that is preserved between sessions.
I have a toolkit full of little batch files that continue to make my day more comfortable, many run from shortcut icons, but many from the command-line. Many of the DOS commands work just fine in Powershell, but one which I use extensively fails. FOR throws an error. e.g.
for /f %i in (alpha.txt) do f ...%i%i......
where "F" is a small batch that I wrote, runs fine at the CMD prompt, but FOR creates confusion for Powershell.
Any suggestion how I can configure Powershell to treat FOR like a CMD command? (hopefully without going too far into the mysteries of real Powershell lingo.)