Calculating File Size in UiPath

How to get particular file size and zip folder size in UiPath, any activity need to use please suggest

Thanks in Advance

@vivekrb131

yes there is a

System.IO.FileInfo(path).Length gives you the file size

FileInfo.Length will return the length of file, in bytes (not size on disk), so this is what you are looking for, I think. If you have already a file path as input, this is the code you need: long length = new System.IO.FileInfo(path).Length;

Hi @Shiva_Nikhil , can we use this for zip file as well ?

Hi @Rajnish_Arora I required size on disk, is there any other way to calculate

@vivekrb131

fileInfo = new FileInfo(zipFilePath);

long= fileInfo.Length

cheers