Auto complete filename and filepath - append
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I do not know the file name at the time of coding. As I get data, it will be stored as "user.txt" Now I need to fill in my code the path and the filename once. Now I shall read the file, process it and save many output files as "useroutput.txt", "useroutput.jpg", and so on. in the same path as the data file. I don't want to keep editing each and every place and time.
How can I do this? Any help is appreciated. Thank you for your time.
0 comentarios
Respuestas (2)
KSSV
el 16 de Mayo de 2021
for i = 1:10
txtFile = strcat('user_',num2str(i),'.txt') ;
imageFile = ['userImage_',num2str(i),'.jpeg'] ;
% save using the file names
end
0 comentarios
Pradeep Chandran
el 16 de Mayo de 2021
Editada: Pradeep Chandran
el 17 de Mayo de 2021
0 comentarios
Ver también
Categorías
Más información sobre Low-Level File I/O en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!