I'm looking to rename files from a USB drive with this script but my src variable isn't working right
I've tried removing the 'E:\SC-102818' from src but it never works
import os
def main():
i = 0
for filename in os.listdir("E:\SC-102818"):
dst ="SCF" + str(i) + ".jpg"
src ='E:\SC-102818' + filename
os.rename(src, dst)
i += 1
if __name__ == '__main__':
main()
I expect it to execute properly but it spits out a FileNotFoundError. When I look at it, the beginning portion of the file it's searching for has E:\SC-102818 at the front.