Link to home
Start Free TrialLog in
Avatar of rincewind666
rincewind666

asked on

Creating folders from listbox (500 points)

I have a list of folders in a listbox (that vaies):

aaa
bbb
ccc

From this I need to create these folders within each other:
aaa\bbb\ccc

I am using Delohi 6.

I am awarding 500 points as this is urgent.  Many thanks fo your help.
Avatar of ChronJob
ChronJob


begin
 
  {$IOChecks off}
  MkDir('TempDirectory');
ChDir(directory);
  
end;

Open in new window

oops forgot to include the loop around that
begin
 
for i := 1 to ListBox1.Items.Count do
begin
 
  {$IOChecks off}
  MkDir(ListBox1.Items[i]);
  ChDir(ListBox1.Items[i]);
 
end;
  
 
end;

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of 2266180
2266180
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ThievingSix
Haha, never would have thought of that ciuly.
you will next time ;)
Avatar of rincewind666

ASKER

Many thanks for your help.