• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to search files presnt on the SD Card?

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all

i want to get list of all the files present on the SD Card along with their Absolute Paths...
just like the Search application in Windows....

Is it Possible with Android??? if Yes can Anybody Please tell me How...???
 
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Prajkti Khadse wrote:i want to get list of all the files present on the SD Card along with their Absolute Paths...



You can get a list of all the files on your SD card and their absolute paths using:

 
Prajkti Khadse
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much Monu.....
 
Ranch Hand
Posts: 136
Android Mac Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Prajakti,

I can have list of files those are stored in SD card.
Can you tell me how to delete a folder that is on SD card? I have made a folder using adb shell inside /sdcard. While deleting files from sdcard code omits that folder. Have you ever tried with folder?

Thanks & Regards
Pratik Goswami.
 
Prajkti Khadse
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried using delete() method of File class...

If it works with file then it should also work with directory because Directory is File too....

Check the read-Write permissions of the directory through DDMS..........
 
Pratik Goswami
Ranch Hand
Posts: 136
Android Mac Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Prajakti,

Thanks for your reply.

I have read/write permissions on created folder and I am using delete() method only to delete that folder but no success at all. Even in DDMS i am unable to delete that folder after once i created it ADB shell.

Thanks & Regards
Pratik Goswami.
 
Prajkti Khadse
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Then,ther's only one reason....... You can't delete System Folders........

It's obvious that, if you create a folder with adb shell, you can't delete it through Code.
You can remove it through adb shell only......

and if you at all want to delete the foldre through code only then you must have created the same through code only.......
 
Pratik Goswami
Ranch Hand
Posts: 136
Android Mac Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

But there must be a solution to do it by programming, Anyways thanks for replaying.

Thanks & Regards
Pratik Goswami
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic