How to Create Multiple Directories

Posted December 15th @ 9:20 pm by m3Rlin

The standard MkDir() function can create only one directory, it can not create subdirectories at one time. This function allows you to create multiple directories (directories inside directories). Delphi 4+ have the ForceDirectories() routine which does the same thing. It is declared in the FileCtrl unit.

uses
SysUtils, FileCtrl;

procedure MkDirMulti(sPath: string);
begin
if sPath[Length(sPath)] = [...]

How to Run Programs and Execute Documents, MailTo: Links and URLs

Posted December 15th @ 12:00 pm by m3Rlin

The easiest way to open a document, program or URL is to use the Windows API ShellExecute() function. Thanks to this function you can execute almost everything in Windows.

uses ShellAPI;

(* sObject - (string) the program, document, URL, … that you want to
** open. This can be:
**
** a document - ‘C:\My Documents\Tips.txt’
** a program - ‘notepad.exe’ [...]