Question about deleting directories with RAPI

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
 
G

Ginny Caughey [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top