3 ms·
They do, but nobody uses batchfiles nowadays. PowerShell is the thing.
by PufPufPuf 5y ago
They do, but nobody uses batchfiles nowadays. PowerShell is the thing.
- hdjjhhvvhga 5y agoFor longer and more complex scripts, probably. For something short, I'd probably use "copy file1 file2" rather than "Copy-Item -Path file1 -Destination file2".
- efdee 5y agoYou could use "cp file1 file2" which is an alias for Copy-Item ;-)
- quietbritishjim 5y agoCitation needed. I would love to get the time to learn PowerShell, but it never quite materilises. I still know how to make a basic batch file though. I suspect that many are in the same position. (Except that probably most don't feel so bad about it as I do!)
- PufPufPuf 5y agoMy evidence is purely anecdotal, for example both Chocolatey and Scoop package managers use PowerShell internally. Also modern Windows versions replaced "open command line" in the Start right click menu with "open PowerShell". There are many things PowerShell can do and batch files can't, starting with piping output between commands.
- Intermernet 5y agoPowershell actually pipes objects between commands. It's just that they often resemble output!
- badsectoracula 5y agoBatch files are used way more than PowerShell - i barely see .ps1 files out there but .bat files are everywhere. Hell, even with .ps1 files, sometimes see them alongside a .bat file that all it does is to launch .ps1 with -ExecutionPolicy Bypass (or whatever is called).