Delete All Files in Device Directory

Jul 10, 2013 at 3: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 11:02 AM
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)