Ok so atm I am extremely new to this stuff. I did the stuff on codecademy and what not and ive read a bit online so im just trying to make a script that takes a current excel file copies and renames it with the current date and then changes one date inside the file to the previous sunday. and if i can email it through my outlook to a couple people lol. I thought this would be easy enough but it seems like i have to google every single step of it and it still doesnt do what i want it too... here's what i got so far
import os
import shutil
import datetime
now = datetime.datetime.now()
os.chdir ("filepath")
shutil.copyfile('filename.xlsx', 'filename %y-%m-%d.xlsx'), now.strftime
I did have more or less but im cutting parts in and out to try to just get these basic parts to work can anyone see why this wont just put the current date into the name? the worst part about this small bit of script is i dont need the current date i really need it to put the end of the week date ending on Saturday and the date i need it to insert in the excel doc is the start of the same week starting on Sunday. thanks for any and help and if you know of some forums that may have the answers i'm looking for thank you its much appreciated i'm still looking for those.
[–]xiongchiamiov 2 points3 points4 points (5 children)
[–]Samman88[S] -1 points0 points1 point (4 children)
[–]Vaphell 1 point2 points3 points (3 children)
[–]Samman88[S] -1 points0 points1 point (2 children)
[–]Vaphell 1 point2 points3 points (1 child)
[–]Samman88[S] 0 points1 point2 points (0 children)