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 visualizzazioni (ultimi 30 giorni)
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 Commenti
Stephen23
Stephen23 il 16 Ago 2022
Modificato: Stephen23 il 16 Ago 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.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Environment and Settings in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by