Quantcast
Channel: HomeSeer Message Board
Viewing all articles
Browse latest Browse all 4847

Deleting all files in a subdirectory

$
0
0
I am trying to delete all .jpg files in a subdirectory.
The subdirectory path is stored in imagepath

I have got this in my script

Dim delimage as String
delimage = imagepath & "*.jpg"
System.IO.File.Delete(delimage)

I am getting this error:

Error 1 Running script C:\Program Files (x86)\HomeSeer HS3\scripts\MK_SnapshotFrontDoorVisitor.vb :Exception has been thrown by the target of an invocation.Illegal characters in path.

I guess its not liking the place holder in *.jpg

Viewing all articles
Browse latest Browse all 4847

Trending Articles