Answered by:
How to Find size of the project in VSS without checking out the files locally or making an archive file.

Question
-
Hi,
Is there a way to find the size of the project without checking out the files locally?
I tried to find the size of the entire project in Visual SourceSafe without going for checking out all files locally and finding it, but i dont find a way in VSS to do it.
Do anyone know how to find the size of the project in VSS without checking it out locally?
thanks,
Viju
Wednesday, November 28, 2007 7:14 AM
Answers
-
Here is a batch file to do the consolidation (the for line ends with the open paranthesis after do)
Code Block@echo off
setlocal ENABLEDELAYEDEXPANSION
set TotalSize=0
for /f "usebackq tokens=2,* delims= " %%I in (`ss properties $/ /r ^| findstr "Size:"`) do (
set /a TotalSize=!TotalSize! + %%I
)echo Total size of files is !TotalSize! bytes
endlocal
Rem If you need to access the total size after this, save it in a temp file with echo
Monday, December 3, 2007 10:46 PMModerator
All replies
-
Sorry, we don't aggregate this information in the database. Doing a Get is the easiest way I can think of.Wednesday, November 28, 2007 8:12 PMModerator
-
Hi Richard,
I found that individual file size within a project can be fetched through the command
ss properties $/ /r | findstr "File: Size:"
Is there a way to consolidate the size of these files to get the projects size?? and will this be the actual size when we get the whole project.
Plz give your view on this.
-Viju
Thursday, November 29, 2007 10:29 AM -
Yes, that's another way to do it. You'd have to write a script to parse the output of 'ss prop', since the total size is not stored anywhere in the database. I'm not sure if it would be faster or slower than running Get.Thursday, November 29, 2007 10:35 PMModerator
-
Here is a batch file to do the consolidation (the for line ends with the open paranthesis after do)
Code Block@echo off
setlocal ENABLEDELAYEDEXPANSION
set TotalSize=0
for /f "usebackq tokens=2,* delims= " %%I in (`ss properties $/ /r ^| findstr "Size:"`) do (
set /a TotalSize=!TotalSize! + %%I
)echo Total size of files is !TotalSize! bytes
endlocal
Rem If you need to access the total size after this, save it in a temp file with echo
Monday, December 3, 2007 10:46 PMModerator