gracias igual a todos.
¿Por qué no eliminar un subdirectorio intermedio en vez de modificar todos los últimos? (alguno que cuelgue de un nivel inferior)
Windows usually limits file names to 260 characters. But the file name must actually be shorter than that, since the complete path (such as C:\Program Files\filename.txt) is included in this character count. This is why you might occasionally encounter an error when copying a file with a very long file name to a location that has a longer path than its current location.