Link to home
Start Free TrialLog in
Avatar of b001
b001Flag for Afghanistan

asked on

remove directory under windows8

Hi Experts
 i have been using the following code to empty the folder then delete it thorough program

                              Erase (Addbs(lcDir) + laDirList(lnI, 1) + "\*.*")
                              Rd (Addbs(lcDir) + laDirList(lnI, 1))

I has been working fine on all operating system.

I have a new machine with OS  Windows8 and it crashes when come to remove directory.
and the error says
 The directory is not empty.

Please help

Thanks.
Avatar of Giovanni
Giovanni
Flag of United States of America image

What are your results when running the program with elevated privileges?  (e.g. right-click on program, run as administrator.)   If successful, modify the program properties compatibility mode options (select Windows XP SP3, for example.)

After that you could test changing the location of the folder (i.e. %temp%\app\data ) to a location not protected by Windows.
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia 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