Aug-04-2020, 08:02 PM
In your rename, you're asking for only the final component of the path
If you want all the components, then you'll need to grab them without the [-1] restriction. Probably just join all the components with "_" to turn it into a string.
path.split(dirpath)[-1]
If you want all the components, then you'll need to grab them without the [-1] restriction. Probably just join all the components with "_" to turn it into a string.