Telos
Subscriber
- 4,388
- 1,497
- NAS
- DS4l8play, DS202j, DS3623xs+, DSM 8.025847-𝘣𝘦𝘵𝘢
Last edited:
I'm running a simple task that creates a log file. But I've been unsuccessful getting a timestamp appended to the filename.
Basically I have working in PowerShell...
What I want the output file to be named is
With Debian I use this...
Of course Windows has no part of that.
I've spent most of a day trying to sort through this, but alas, Google has not been cooperative.
On the off-chance someone here might know some Windows command voodoo... I'm hoping for a hint of what to do. Thanks all!
Basically I have working in PowerShell...
foobar.exe -logs > .\mylogs\record.log
What I want the output file to be named is
record-20221128-023321.log
. Either I'm too dense to figure this out, or this is a place where Windows comes up short in contrast to Linux.With Debian I use this...
foobar.exe -logs > .\mylogs\record-$(date +\%Y\%m\%d-\%H\%M\%S).log
Of course Windows has no part of that.
I've spent most of a day trying to sort through this, but alas, Google has not been cooperative.
On the off-chance someone here might know some Windows command voodoo... I'm hoping for a hint of what to do. Thanks all!