Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
function ForceDirectories(FolderPath: string): boolean;
Creates all the folders along a given path.
The ForceDirectories function creates a directory and all sub-directories that do not already exist. The function returns False if sDir is an empty string or a bad path name, True if succesfull.
var sDir : string;
sDir := 'c:\apps\code\free';;
//if sDir path does not exist, create it!
if NOT DirectoryExists(sDir) then
ForceDirectories(sDir);
|
GetCurrentDir, DirectoryExists
|
Free Delphi code snippet inside every Delphi Newsletter! |
|
|
|
Got some code to share? Got a question? Need some help? |
|
|