27 May

Get a unique name for temporary file

Using GetTempFileName, we can create a unique name for temporary file. It’s useful when your application is using temporary files and you want to save them into default TEMP folder and use a “random” filename.

25 May

How to detect application associated with file

To get full path to application associated with any file type, we need standard ShellAPI unit and the rest will do the FindExecutable function.

15 May

Searching for string within a file

To search for a specific substring within any type of file, we can use this rather complex function.

01 Jan

CRC32 (Cyclic Redundency Check)

One of the most effective method to check if the file is ok is to calculate CRC32 checksum and compare it with previously saved value. Using CRC check, you can also compare two files, verify downloaded files etc…

16 Oct

Directory structure with associated icons and file info in ListView

Using ShellAPI unit and few lines of code, we can load directory structure into ListView and show associated icons and information for each file.