Borrar filtros
Borrar filtros

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 visualizaciones (últimos 30 días)
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 comentarios
Stephen23
Stephen23 el 16 de Ag. de 2022
Editada: Stephen23 el 16 de Ag. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by