W wdegler Active Member Licensed User Longtime User Aug 24, 2015 #1 I wish to load files from my DirAssets directory, one of which has the name g1d302.mp3. The code is, in part, dim I as integer dim FilLst as List dim FilNam as string FilLst.Initialize FilLst=File.ListFiles(Dir.Assets) For I=0 to FilLst.Size-1 FilNam=FilLst.get(I) --------------------------- When the file (named above) is loaded, FilName has the value g1d302.mp3.unblocked. Why has ".unblocked" been appended? How do I avoid that? Can someone explain this and provide a solution? Help!
I wish to load files from my DirAssets directory, one of which has the name g1d302.mp3. The code is, in part, dim I as integer dim FilLst as List dim FilNam as string FilLst.Initialize FilLst=File.ListFiles(Dir.Assets) For I=0 to FilLst.Size-1 FilNam=FilLst.get(I) --------------------------- When the file (named above) is loaded, FilName has the value g1d302.mp3.unblocked. Why has ".unblocked" been appended? How do I avoid that? Can someone explain this and provide a solution? Help!
Erel B4X founder Staff member Licensed User Longtime User Aug 24, 2015 #2 The suffix is unpacked not unblocked, right? It is related to the virtual assets folder. You should just load the file like you load any other file: Code: Copy MediaPlayer.Load(File.DirAssets, "g1d302.mp3") Upvote 0
The suffix is unpacked not unblocked, right? It is related to the virtual assets folder. You should just load the file like you load any other file: Code: Copy MediaPlayer.Load(File.DirAssets, "g1d302.mp3")
W wdegler Active Member Licensed User Longtime User Aug 24, 2015 #3 Erel said: The suffix is unpacked not unblocked, right? It is related to the virtual assets folder. You should just load the file like you load any other file: Code: Copy MediaPlayer.Load(File.DirAssets, "g1d302.mp3") Click to expand... Erel: You are right! The changed file name is "g1d302.mp3.unpacked". I used FilLst=File.ListFiles(Dir.Assets) because the app needs to process ALL the files in File.DirAssets without prior knowledge of their names or number of files. MediaPlayer.Load(File.DirAssets, "g1d302.mp3") requires specifying the name. Please advise. Walter Upvote 0
Erel said: The suffix is unpacked not unblocked, right? It is related to the virtual assets folder. You should just load the file like you load any other file: Code: Copy MediaPlayer.Load(File.DirAssets, "g1d302.mp3") Click to expand... Erel: You are right! The changed file name is "g1d302.mp3.unpacked". I used FilLst=File.ListFiles(Dir.Assets) because the app needs to process ALL the files in File.DirAssets without prior knowledge of their names or number of files. MediaPlayer.Load(File.DirAssets, "g1d302.mp3") requires specifying the name. Please advise. Walter
Erel B4X founder Staff member Licensed User Longtime User Aug 24, 2015 #4 There is always prior knowledge about the assets files as they are added before compilation. Listing the files under File.DirAssets is problematic. I recommend you to add a text file with the file names and use it instead. You can disable the virtual assets folder feature with the #DebuggerForceStandardAssets attribute. Still you may encounter unexpected files. Upvote 0
There is always prior knowledge about the assets files as they are added before compilation. Listing the files under File.DirAssets is problematic. I recommend you to add a text file with the file names and use it instead. You can disable the virtual assets folder feature with the #DebuggerForceStandardAssets attribute. Still you may encounter unexpected files.
W wdegler Active Member Licensed User Longtime User Aug 24, 2015 #5 Erel said: There is always prior knowledge about the assets files as they are added before compilation. Listing the files under File.DirAssets is problematic. I recommend you to add a text file with the file names and use it instead. You can disable the virtual assets folder feature with the #DebuggerForceStandardAssets attribute. Still you may encounter unexpected files. Click to expand... Erel: Thank you for your response, Erel; this is exactly the information I need! Walter Upvote 0
Erel said: There is always prior knowledge about the assets files as they are added before compilation. Listing the files under File.DirAssets is problematic. I recommend you to add a text file with the file names and use it instead. You can disable the virtual assets folder feature with the #DebuggerForceStandardAssets attribute. Still you may encounter unexpected files. Click to expand... Erel: Thank you for your response, Erel; this is exactly the information I need! Walter