OpenNET CF RAPI Delete all files in a device directory? RRS feed

  • Question

  • I need to clean out a device directory before I copy new files from the PC to the device via an OpenNET CF RAPI conversion.

    I know to use File.IO on the PC but Whats an easy way to delete all files within the Device directory using RAPI?



    Monday, July 8, 2013 8:46 PM

All replies

  • Hi,

    From the RAPI class, have you tried using the RemoveDeviceDirectory, passing in True for recursive deletion?


    Paul Diston

    http://www.smartmobiledevice.co.uk http://www.smdwp.co.uk

    Wednesday, July 10, 2013 9:37 AM
  • Imports OpenNETCF.Desktop.Communication

    Public Class Form1
        Private mRAPI As New RAPI
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
                mRAPI.CreateDeviceDirectory("\Flash Storage")

            Catch ex As Exception

            End Try

        End Sub

    \Flash Storage directory is a protected directory - all I want to do is delete the files within this directory.  I see no "True" parameter the only parameter is the path.

    Friday, July 12, 2013 7:28 PM