Link to home
Start Free TrialLog in
Avatar of Richard Teasdale
Richard TeasdaleFlag for United Kingdom of Great Britain and Northern Ireland

asked on

RENAME A FILE USING DATE CREATED

Hi : I have a lot of invoices stored in pdf format. Here is a sample:
608_Invoice_025516 (HUBB4501609265 139231 135279), 025906 (HUBB4501622217140060LANTERN), _.pdf
Each file can hold several invoices; the file is invoices to customer 608 for the day (date file created).
To help search I would like to rename each file  as follows:
YYYYMMDD_XXX.pdf
where YYYYMMDD is date created
XXX is customer  - first three characters of file name.
Is this something python can do happily?
I have made a few attempts and got into knots, I am afraid!
Thanks!
Avatar of Danny Robinson
Danny Robinson
Flag of United Kingdom of Great Britain and Northern Ireland image

Not sure if I am barking up the wrong tree, but you can utility to batch rename files to the format/name you require.
Sorry if this no use to you.
Avatar of Richard Teasdale

ASKER

Thanks, Danny. I was thinking of this but trying to persevere with python; just need a help sometimes! Thanks again.
ASKER CERTIFIED SOLUTION
Avatar of Richard Teasdale
Richard Teasdale
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
its my own answer...