Oct-03-2019, 05:49 PM
Hi again,
so this didn't do what I was thinking.
If you print the src_file it gives this:
C:\Users\Ron McMillan\Desktop\demo1.xlsx\demo1.xlsx
And the print dest_file gives this:
C:\Users\Ron McMillan\Desktop\demo1.xlsx\2035.xlsx (which is almost there if the demo1.xlsx part is removed)
What I need is for the dest_file to be this:
C:\Users\Ron McMillan\Desktop\2035.xlsx
I have been playing around with os.path.splitext and os.path.split as it seems I need to break up the path, and replace the filename with the newly generated number.But no progress.
Slightly breaking my mind as lost as to what to try. Am I even on the right path(no pun intended)
so this didn't do what I was thinking.
If you print the src_file it gives this:
C:\Users\Ron McMillan\Desktop\demo1.xlsx\demo1.xlsx
And the print dest_file gives this:
C:\Users\Ron McMillan\Desktop\demo1.xlsx\2035.xlsx (which is almost there if the demo1.xlsx part is removed)
What I need is for the dest_file to be this:
C:\Users\Ron McMillan\Desktop\2035.xlsx
I have been playing around with os.path.splitext and os.path.split as it seems I need to break up the path, and replace the filename with the newly generated number.But no progress.
Slightly breaking my mind as lost as to what to try. Am I even on the right path(no pun intended)