Question about deleting directories with RAPI

  • Thread starter Thread starter Patrick Dugan
  • Start date Start date
P

Patrick Dugan

I want to delete an entire directory on my PDA including any files within it
from the Windows PC. (I'm using vb.net)

When I use the RAPI command:

m_rapi.RemoveDeviceDirectory(strCommand, True)

This does delete the folder but it does so somewhat slowly. Each file is
deleted one-at-a-time and then
finally the folder. If I right-click a folder on the device itself I can
delete a folder more quickly. Is there
a way to use RAPI within vb.net to delete a folder "more directly?" so it
happens more quickly?

Patrick Dugan
 
Patrick,

The Rapi function to actually remove the directory, CeRemoveDirectory,
requires an empty directory, so any files in it must be removed first. I
don't know of any way around that. When you remove a directory on the device
itself, you're using a different API so that might explain the performance
difference. I guess you could use Rapi to launch an app on the device that
did the deletions and removed the directory, but I don't know if that would
really be any faster.
 
Back
Top