I have a powershell command running when I execute a bat file,
The command is
@powershell -command " [long]((date) . touniversaltime() - [datetime]' 1970-01-01 '). totalmilliseconds"
I have also used
powershell.exe " [long]((date). touniversaltime () -[datetime]'1970-01-01 ') . totalmilliseconds "
This returns the correct data to the screen but my question is how do I save this value and use it to attach it to a filename.
Thanking You
I vaguely remembered the code from an earlier answer of mine. My advice from earlier still stands: Just write your script in PowerShell instead of creating a weird hybrid that’s just twice as hard to maintain.