I am relatively new to python and linux. How can I move files from subfolders with a specific name.
Folder/subfolder/sharp
Folder has 100+ subfolders. each subfolder has 5 subfolders (sharp, blur, etc). each of these subfolders has 50+ photos.
I want to move all sharp images to a single folder. However, all the files in every sharp subfolder have the same name. Like 1.jpg, 2.jpg etc.
i was using bash command
mv ~/Folder//sharp/.png ~/sharp/
but as the files in all sharp folders have the same name the move fails after it goes the second sharp folder as these files already exist in the destination folder. I want to transfer all of these files while renaming the files with a number at the end of each filename that already exist in the destination. If you know a python script or let me know what to change in my command to do the transfer please let me know.
https://stackoverflow.com/questions/66147779/move-files-from-certain-subfolders-while-numbering-files-with-same-name February 11, 2021 at 10:02AM
没有评论:
发表评论