Search found 3 matches

by kalyanpuli
06 Feb 2017 01:45
Forum: DOS Batch Forum
Topic: Help on getting file size in proper manner
Replies: 9
Views: 6950

Re: Help on getting file size in proper manner

Hi, Got it, can I get the result in MB's? It's giving me blank value using the below one. :next ::get DB size set targetDBSize= for %%i in ("\\SERVER_NAME\c$\Progra~1\Micros~1\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\%targetSite%.mdf") do set /A targetDBSize=%%~zi/1024/1024 echo %targetDBSize% >>...
by kalyanpuli
01 Feb 2017 08:32
Forum: DOS Batch Forum
Topic: Help on getting file size in proper manner
Replies: 9
Views: 6950

Re: Help on getting file size in proper manner

Hi,
But if the file size is more than 2GB, it is not showing any result.

-Kalyan
by kalyanpuli
31 Jan 2017 10:16
Forum: DOS Batch Forum
Topic: Help on getting file size in proper manner
Replies: 9
Views: 6950

Help on getting file size in proper manner

Hi, I wrote a script which will get the file size and dump to a CSV. Below is the script: ::get DB size set targetDBSize= for /F "tokens=1 " %%i in ('du -m \\servername\c$\Progra~1\Micros~1\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\%targetSite%.mdf') do set targetDBSize=%%i echo %targetServer%,%ta...