How to get the File Directory of a file (C:\myfolder\subfoler\mydoc.pdf). I also want to add the size of the subfolders, and finally the main folder size. This is for a .NET CLR that I need to integrate with SQL Server 2005 for a SSRS report.
How to get the File Directory of a file (C:\myfolder\subfoler\mydoc.pdf). I also want to
Share
You can use GetDirectoryName, to get only the directory path of the file:
For calculating the directory and subdirectory size, you can do something like this: