Effacer les filtres
Effacer les filtres

ExtractBetween: Element 2 of the text contains 1 substrings while the previous elements have 0. All elements must contain the same number of substrings.

14 vues (au cours des 30 derniers jours)
Error using extractBetween (line 79)
Element 2 of the text contains 1 substrings while the previous elements have 0. All
elements must contain the same number of substrings.
files_in_folder = dir('directory/*.mp4');
{files_in_folder.name}
id = extractBetween({files_in_folder.name}, 'file_', '_');
%an example file name would be file_123_test.mp4
The output of {files_in_folder.name} holds and extra file named '.mp4' with no title, just the file extentions mp4. I checked the directory but ther is no such file called '.mp4'.
  2 commentaires
Stephen23
Stephen23 le 16 Août 2022
Modifié(e) : Stephen23 le 16 Août 2022
" checked the directory but ther is no such file called '.mp4'."
How exactly did you "check" the directory? By unreliably looking at something like MS File Explorer, or reliably using a tool that can actually list all files? If using a reliable tool, please show the command you used and its output.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Environment and Settings dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by