3

I want to show only a particular folder inside my app's Documents directory when seen in iTunes.

All the other folders and my database, which are inside my app's Documents directory should be hidden from the user when he tries file sharing in my app in iTunes.

How can I do so?

memmons
  • 40,222
  • 21
  • 149
  • 183
Meghan
  • 1,004
  • 1
  • 15
  • 34

1 Answers1

0

Make your other folders or files hidden by prefixing their name with a . which is the unix standard for hiding files.

David Knight
  • 763
  • 6
  • 12
  • I have my database in same folder. So should I name the database with prefix a. as you said? Will I be able to use the database as before? – Meghan Mar 07 '11 at 05:17
  • if you want to hide it yes. Any folder or file with a name starting with a . will be hidden and so not appear in iTunes. They will still be backed up in case you were wondering about that. – David Knight Mar 07 '11 at 20:37
  • I've documented this in another SO question -- this answer is wrong. You can not hide your folders, even if you preface it with a "." -- at least on the PC side. On the Mac side, if you have "show hidden files" turned on, you'll see it there as well. – memmons May 21 '11 at 13:41
  • How is the answer wrong? Not sure what you mean by show hidden files on the Mac side. We are talking about the File Sharing section of iTunes here. There is no show hidden files option. Having finder show hidden files does not effect iTunes, files and folders are still hidden. Just checked on a PC and they are still hidden as well. The answer is correct unless there is an iTunes option I am unaware of. – David Knight Jun 03 '11 at 16:46
  • There is a script which can make particular file/folder hidden. But I am wondering how can we run that script from an iPhone app. If anyone knows please do help. The script is something like this: (for making it hidden) setfile -a V samplefile.txt & (for making it visible) -a v samplefile.txt. – Dip Dhingani Sep 20 '11 at 07:25