dear specialist
i want to be able to create folders during runtime ( the folders will be filled by the same program with text files);
I made following procedure but that did not work.
When i create the ALevel folder by hand then it works,but that is not what i want.
In the "createdir description"it says:
If the directory doesn't contain an absolute path, then the directory is created below the current working directory.
so i create a path ,exclusive the textfilename.
procedure TForm1.createmyfoldersbtnClick(Sender: TObject);
var n ,intnow,intdatum:integer;
dubnow:double;
datstr:string;
begin
dubnow:=now;
intnow:=trunc(now);
for n:=0 to 10 do
begin
intdatum:=n+ intnow;
datstr:='c:\users\public\ALEVEL\myfolder'+inttostr(intdatum)+'\';
if directoryexists(datstr) then memo1.lines.add (datstr+ 'cannot be to created ' )
else
begin
if CreateDir (datstr) then memo1.lines.add ('succesfull create '+datstr)
else memo1.lines.add (datstr + '___create failed');
end;
end;//for
end;
What is wrong here?
frederic