S
Spin
The script below determines the size in bytes of file01.log on Server1. But
what I need is the size in bytes to have comma separators like one normally
writes a big number out, like this:
2,345,124
Right now the script returns the value similar to below w/out commas, making
it a bit harder to read:
2345124
REM This file determines size of file01.log on Server1
@echo off
for /f "tokens=3" %%a in (
'dir /-c \\Server1\d$\file01.log ^| find "/"'
) do set zsize=%%a
for /f "tokens=5" %%a in (
'echo.^|time^|findstr /i "Current"'
) do set ztime=%%a
if "%ztime:~1,1%" EQU ":" set ztime=0%ztime%
set ztime=%ztime:~0,8%
for /f "tokens=*" %%a in (
'date /t'
) do set zdate=%%a
echo file01.log file size on Server1 on %zdate%%ztime% is %zsize% >
D:\Tracker.txt"
what I need is the size in bytes to have comma separators like one normally
writes a big number out, like this:
2,345,124
Right now the script returns the value similar to below w/out commas, making
it a bit harder to read:
2345124
REM This file determines size of file01.log on Server1
@echo off
for /f "tokens=3" %%a in (
'dir /-c \\Server1\d$\file01.log ^| find "/"'
) do set zsize=%%a
for /f "tokens=5" %%a in (
'echo.^|time^|findstr /i "Current"'
) do set ztime=%%a
if "%ztime:~1,1%" EQU ":" set ztime=0%ztime%
set ztime=%ztime:~0,8%
for /f "tokens=*" %%a in (
'date /t'
) do set zdate=%%a
echo file01.log file size on Server1 on %zdate%%ztime% is %zsize% >
D:\Tracker.txt"