Find a file on computer searching by your file size
Clash Royale CLAN TAG#URR8PPP
Find a file on computer searching by your file size
I would like to create a program that works like "Search Everything", and search files all over the computer. You do not have to have everything that "Search Everything" has, actually I just wish there was a search using the file size.
It has some way of searching a file in all the directories of the computer based on its size in kb, regardless of the name of the file, it would be located only by its size.
DirectoryInfo
FileInfo
FileInfo
DirectoryInfo.GetFiles
Length
Length
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Implement a recursive file search using the
DirectoryInfo
andFileInfo
classes. You should have no trouble finding examples. Of course, you should have already looked for examples. When you get a list ofFileInfo
objects by callingDirectoryInfo.GetFiles
, you can then compare theLength
property of each one to the file size you're interested in. Note thatLength
is the number of bytes in the file, not kilobytes. If you need to convert, make sure that you are clear about whether you're using 1000 or 1024 as a factor. Windows uses 1024.– jmcilhinney
42 mins ago