Delete All Files in Device Directory

Jul 10, 2013 at 4:04 AM
I need to use RAPI to delete all files in a directory but leave the directory intact.

I know about the deleteFiles but need to delete all files in a directory.
Nov 25, 2013 at 12:02 PM
try this
    Dim dev = mgr.Devices.FirstConnectedDevice

    Dim RAPIfile As RemoteFile
    Dim RAPIfolder As RemoteDirectory

    On Error Resume Next

    Dim l As Array

     Path = "\Storage Card\Data\"

    l = RAPIfolder.GetFiles(dev, Path)

    For Each s As String In l
        RAPIfile.Delete(dev, Path & s)