Rename a folder with files in it
33 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Cris LaPierre
am 19 Mär. 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 Kommentare
Siehe auch
Kategorien
Mehr zu Search Path finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!