I have seen many posts about creating a unique filename from the naive %TIME% to the plausible (but insufficient) %RANDOM%. Using wmic os get localdatetime is m
I like Aacini's JScript hybrid solution. As long as we're borrowing from other runtime environments, how about using .NET's System.GUID with PowerShell?
@echo off
setlocal
for /f "delims=" %%I in ('powershell -command "[string][guid]::NewGuid()"') do (
set "unique_id=%%I"
)
echo %unique_id%