Darren DICK
darrend at nimble.com.au
Wed Feb 7 16:09:39 CST 2007
Hi Bobby I tried that but the file name already has the dot PDF in it so with that method I end up with file names like inv10310.pdf-016.pdf I wrote a routine to strip all the filenames of their dot PDF extension rename and then put a desired extension on the new file name Many thanks Darren ------------------ -----Original Message----- From: Bobby Heid [mailto:bheid at sc.rr.com] Sent: Wednesday, 7 February 2007 10:44 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Rename files Darren, As you read each file name, split it up into the file name and the extension. Then NewName="Inv03" & FileName & "-016." & FileExt Then rename the file to NewName. Bobby -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren DICK Sent: Wednesday, February 07, 2007 6:30 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Rename files Hi All I have a renaming routine but can't quite work out the syntax I have file names in a folder similar to 10.pdf 11.pdf 12.pdf 13.pdf etc etc (All sequential) I want to prefix each file name in the nominated folder with "inv103" I can do this bit - no prob But I want to insert "-016" before the .PDF bit So final filename is like. inv10310-016.pdf inv10311-016.pdf inv10312-016.pdf inv10313-016.pdf and so on Any suggestions? Many thanks in advance Darren -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com