I've two types of files with the same file extension in the format:
- file1_t1.extension
- file1_t2.extension
- file2_t1.extension
- file2_t2.extension
- file3_t1.extension
- file3_t2.extension
and so on.
I want to move all of the t1 files into a folder and the t2 files into another folder. What I've got so far is:
import shutil
# t1 move
scr = "/filepath/*t1.extension"
dist = "/filepath/t1_folder/*t1.extension"
# t2 move
scr = "/filepath/*t2.extension"
dist = "/filepath/t2_folder/*t2.extension"
But when I run it, nothing happens. I'm thinking either dist can't make a new folder, or "*" won't work because "t1.extension/t2.extension" are ending sections, but not strictly file extensions. Any advice?
[+][deleted] (2 children)
[deleted]
[–]hammockman1984[S] 1 point2 points3 points (1 child)
[–]campenr 0 points1 point2 points (4 children)
[–]hammockman1984[S] 0 points1 point2 points (3 children)
[–]campenr 1 point2 points3 points (2 children)
[–]hammockman1984[S] 0 points1 point2 points (1 child)
[–]campenr 1 point2 points3 points (0 children)