delete folder vb.net

M

Mike

I am working with some large directories where I have to pick and choose data
then delete what I don't use. I go through the folders, like so. Each
directory will be left with many files all marked as readonly how can I
delete the entire folder easily?

Access to the path 'A1.CTL' is denied. <--- A1.CTL is a file, with readonly
attributes, I am an admin so it is not permissions




For Each dri In diArr

'dri.Name
'Copy .jpg from each plate
CTLFileCopy(strPathToRead & strFolderPath & "\" &
dri.Name.ToString & "\" & dri.Name.ToString & ".jpg", strPathToWrite &
strFolderPath & "\" & dri.Name.ToString & ".jpg")

dri.Delete(True)
Next dri
 
M

Mike

Thanks for the reply. I have it working now, I very much wanted to stay in
vb.net and not venture out to the fso. The fso would have been much easier.
Am I correct in thinking that the scripting engine would be slower?

Mike
 
C

Cor Ligthert[MVP]

For sure

Cor

Mike said:
Thanks for the reply. I have it working now, I very much wanted to stay
in
vb.net and not venture out to the fso. The fso would have been much
easier.
Am I correct in thinking that the scripting engine would be slower?

Mike
 

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