I would like to create a subfolder without numbering
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Alberto Acri
el 8 de Nov. de 2022
Editada: KALYAN ACHARJYA
el 8 de Nov. de 2022
I would like to create a subfolder without numbering. I tried this code:
GLOBAL2 = 'C:\Users\Alberto\Desktop\GLOBAL2';
for K = 1
folder_DATA = fullfile(GLOBAL2, sprintf('DATA %d', K));
name_SF = 'newSubfolder';
new_folder = fullfile(folder_DATA, sprintf('%s%d', name_SF, 1)); % i would like to create a 'newSubfolder' subfolder (and not 'newSubfolder1')
end
How can I change it?
I had thought about mkdir but could not apply it to the desired folder.
mkdir parentFolder folderName
0 comentarios
Respuesta aceptada
KALYAN ACHARJYA
el 8 de Nov. de 2022
Editada: KALYAN ACHARJYA
el 8 de Nov. de 2022
Just remove %d
new_folder = fullfile(folder_DATA, sprintf('%s', name_SF));
If you're generating a single folder, that's fine, but to create the folders within the loop, you should put the names sequentially, which can help to differentiate.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Data Distribution Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!