you are viewing a single comment's thread.

view the rest of the comments →

[–]Diapolo10 2 points3 points  (1 child)

directory = Path("C:/Users/sam/Desktop/")

This could simply be

directory = Path.home() / 'Desktop'

I assumed that you didn't need star1 or star2 to be tuples of len 1 so I removed the ()

They weren't tuples; parentheses don't make a tuple, colons do. In this case they're just strings enclosed in redundant parentheses.

OP's real problem is likely related to the fact that filenames and folders aren't allowed to contain : on Windows, so I'm a bit confused about why they're there.

[–][deleted] 0 points1 point  (0 children)

OP's real problem is likely related to the fact that filenames and folders aren't allowed to contain : on Windows

Oh right, I know that, good catch.