2025-12-24 2:28 AM - last edited on 2025-12-24 7:13 AM by mƎALLEm
Hello, everyone on the forum.
I am using ThreadX and FileX to write files to an SD card on the STMH735G-DK.
I successfully created a directory using fx_directory_create and created a file using fx_file_create.
This time, we'll tackle directory deletion using fx_directory_delete.
However, if the directory contains files, deletion will fail with error code FX_DIR_NOT_EMPTY.
How can I search for filenames within a directory using FileX?
If anyone knows anything, please give me some advice.
Solved! Go to Solution.
2025-12-25 2:42 AM
Using `fx_directory_next_entry_find` to retrieve entries,
`fx_directory_name_test` to check if they are directories,
and `fx_file_delete` to delete files until the return value `FX_NO_MORE_ENTRIES` is returned,
I successfully deleted the directories.
Thank you for your advice.
2025-12-24 7:13 AM
fx_directory_first_entry_find
fx_directory_first_full_entry_find
fx_directory_next_entry_find
fx_directory_next_full_entry_find
From:
Solved: filex file list - STMicroelectronics Community
2025-12-25 2:42 AM
Using `fx_directory_next_entry_find` to retrieve entries,
`fx_directory_name_test` to check if they are directories,
and `fx_file_delete` to delete files until the return value `FX_NO_MORE_ENTRIES` is returned,
I successfully deleted the directories.
Thank you for your advice.