Lakhtin_V Active Member Licensed User Longtime User Mar 26, 2025 #1 Please help me solve my problem. I created a custom directory inside the standard directory (File.DirInternal). File.MakeDir(File.DirInternal,"Sound"): File.MakeDir(File.DirInternal,"Sound") How can I get a list of files from this custom directory - "Sound" ? B4X: allFiles = File.ListFiles(File.DirInternal) For Each fName As String In allFiles If fName.ToLowerCase.EndsWith(".pcm") Then The File.ListFiles command does not support specifying internal folders. How can I save a file inside the SOUND folder? B4X: saveFile = File.OpenOutput(File.DirInternal, fName, False)
Please help me solve my problem. I created a custom directory inside the standard directory (File.DirInternal). File.MakeDir(File.DirInternal,"Sound"): File.MakeDir(File.DirInternal,"Sound") How can I get a list of files from this custom directory - "Sound" ? B4X: allFiles = File.ListFiles(File.DirInternal) For Each fName As String In allFiles If fName.ToLowerCase.EndsWith(".pcm") Then The File.ListFiles command does not support specifying internal folders. How can I save a file inside the SOUND folder? B4X: saveFile = File.OpenOutput(File.DirInternal, fName, False)
DonManfred Expert Licensed User Longtime User Mar 26, 2025 #2 Lakhtin_V said: allFiles = File.ListFiles(File.DirInternal) Click to expand... B4X: dim allfiles as List = File.ListFiles(File.Combine(File.DirInternal, "Sound")) File.ListFiles does NOT work Recursively. Upvote 0
Lakhtin_V said: allFiles = File.ListFiles(File.DirInternal) Click to expand... B4X: dim allfiles as List = File.ListFiles(File.Combine(File.DirInternal, "Sound")) File.ListFiles does NOT work Recursively.
Lakhtin_V Active Member Licensed User Longtime User Mar 26, 2025 #3 DonManfred said: B4X: dim allfiles as List = File.ListFiles(File.Combine(File.DirInternal, "Sound")) File.ListFiles does NOT work Recursively. Click to expand... How can I save a file inside the SOUND folder? saveFile = File.OpenOutput(File.DirInternal, fName, False) Upvote 0
DonManfred said: B4X: dim allfiles as List = File.ListFiles(File.Combine(File.DirInternal, "Sound")) File.ListFiles does NOT work Recursively. Click to expand... How can I save a file inside the SOUND folder? saveFile = File.OpenOutput(File.DirInternal, fName, False)
DonManfred Expert Licensed User Longtime User Mar 26, 2025 #4 Lakhtin_V said: How can I save a file inside the SOUND folder? Click to expand... What did you tried? - You need a path and a filename - You can build the path the same way i did for the ListFiles-Command Try it yourself Upvote 0
Lakhtin_V said: How can I save a file inside the SOUND folder? Click to expand... What did you tried? - You need a path and a filename - You can build the path the same way i did for the ListFiles-Command Try it yourself
Lakhtin_V Active Member Licensed User Longtime User Thursday at 5:15 AM #5 DonManfred said: What did you tried? - You need a path and a filename - You can build the path the same way i did for the ListFiles-Command Try it yourself Click to expand... /SOUND/sound01.pcm or SOUND/sound01.pcm Upvote 0
DonManfred said: What did you tried? - You need a path and a filename - You can build the path the same way i did for the ListFiles-Command Try it yourself Click to expand... /SOUND/sound01.pcm or SOUND/sound01.pcm
teddybear Well-Known Member Licensed User Thursday at 5:39 AM #6 Lakhtin_V said: saveFile = File.OpenOutput(File.DirInternal, fName, False) Click to expand... As DonManfred said, do it like this B4X: saveFile = File.OpenOutput(File.Combine(File.DirInternal, "Sound"), "sound01.pcm", False) or saveFile = File.OpenOutput(File.DirInternal&"/Sound", "sound01.pcm", False) Last edited: Thursday at 5:50 AM Upvote 0
Lakhtin_V said: saveFile = File.OpenOutput(File.DirInternal, fName, False) Click to expand... As DonManfred said, do it like this B4X: saveFile = File.OpenOutput(File.Combine(File.DirInternal, "Sound"), "sound01.pcm", False) or saveFile = File.OpenOutput(File.DirInternal&"/Sound", "sound01.pcm", False)
Lakhtin_V Active Member Licensed User Longtime User Monday at 12:42 PM #7 teddybear said: As DonManfred said, do it like this B4X: saveFile = File.OpenOutput(File.Combine(File.DirInternal, "Sound"), "sound01.pcm", False) or saveFile = File.OpenOutput(File.DirInternal&"/Sound", "sound01.pcm", False) Click to expand... Thank you! All work Upvote 0
teddybear said: As DonManfred said, do it like this B4X: saveFile = File.OpenOutput(File.Combine(File.DirInternal, "Sound"), "sound01.pcm", False) or saveFile = File.OpenOutput(File.DirInternal&"/Sound", "sound01.pcm", False) Click to expand... Thank you! All work