Filter löschen
Filter löschen

how delete .txt in file extension with uigetdir comand

3 Ansichten (letzte 30 Tage)
Luca Re
Luca Re am 20 Mai 2023
selpath = uigetdir('C:\rova\','Seleziona cartella da caricare')
filelist = dir(strcat(selpath,"\*.txt"));
file = {filelist.name};
file(1)
ans =
1×1 cell array
{'prova.txt'}
i want to catch only name
now i try it:
file1=string(file);
ewStr = erase(file1,".txt")
now i solve it
or is there a better method?

Antworten (1)

Edoardo Mattia Piccio
Edoardo Mattia Piccio am 25 Mai 2023

Community Treasure Hunt

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

Start Hunting!