Need some help in creating function which can create folders recursively with giving path:
C:\\TestFolder\\Another\\AndAnother
Delphi function
Use
ForceDirectories('C:\TestFolder\Another\AndAnother');
(This is a standard RTL function, found in SysUtils.pas. Hence you do not need to create your own function, even though that wouldn't have been difficult.)
This uses the new IOUtils instead of SysUtils.
IOUtils is cross-platform compatible and UNC aware (but is also buggy in a few places).
function ForceDirectories(FullPath: string): Boolean; // Works with UNC paths
begin
TDirectory.CreateDirectory(FullPath);
Result:= DirectoryExists(FullPath);
end;