Rename a folder with files in it
33 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello, I was trying to rename folder using movefile() function but realised that it only works on empty folders.
Is there anyway to rename this folder with files in it?
oldfolderdir = "c:\temp\oldfoldername_withstuffinit"
newfolderdir = "C:\temp\newfoldername_withstufffrom_oldfoldername"
movefile oldfolder newfolder
0 comentarios
Respuestas (1)
Cris LaPierre
el 19 de Mzo. de 2021
The movefile function can rename folders with files in them (I just tested on a folder on my computer) but it does depend on the write permissions you have. You can try using the following syntax for locations that are not writable.
0 comentarios
Ver también
Categorías
Más información sobre Search Path 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!