delete folder vb.net

  • Thread starter Thread starter Mike
  • Start date Start date
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
 
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
 
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
 
Back
Top