I am trying to use a shutil script I found, but running it triggers:
SyntaxError: unterminated string literal (detected at line 4)
This is maybe related to the script containing raw windows paths. How do I fix the script?
import shutil
import os
source = r"C:\Users\[username]\Downloads\"
dest1 = r" C:\Users\[username]\Desktop\Reports\14"
dest2 = r" C:\Users\[username]\Desktop\Reports\52"
dest3 = r" C:\Users\[username]\Desktop\Reports\59"
files = os.listdir(source)
for f in files:
if (f.startswith("Log 14")):
shutil.move(f, dest1)
elif (f.startswith("Log 54")):
shutil.move(f, dest2)