Android Question how can I delete a file?

Discussion in 'Android Questions' started by khosrwb, Jun 24, 2015.

  1. khosrwb

    khosrwb Active Member Licensed User

    hi
    how can I delete a file?
    for example : I will delete mMusic.mp3 file from Music dirctory

    I use from this code but don't delete the my file:

    Code:
    File.Delete("/mnt/sdcard/music", list2.Get(Position))
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Make sure that the path is correct. Remember that Android file system is case sensitive.
     
    khosrwb likes this.
  3. khosrwb

    khosrwb Active Member Licensed User

    thanks it's usefull
    I use from this code and I can , but
    Code:
    File.Delete("/mnt/sdcard/music", Value&".mp3")
    after the use from this code , this problem occurred There are files on the memory card, but it can not run. I can find them but it can not play

    I don't know what to do?
     
Loading...