[AccessD] Rename files

paul.hartland at fsmail.net paul.hartland at fsmail.net
Wed Feb 7 05:50:12 CST 2007


This might work, not knowing how you are renaming your files...
Get current filename
New filename = "inv103" & Mid(OldFileName,1,(Len(OldFileName)-4)) & "-016.pdf"

Paul Hartland




Message Received: Feb 07 2007, 11:34 AM
From: "Darren DICK" 
To: "'Access Developers discussion and problem solving'" 
Cc: 
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





Paul Hartland
paul.hartland at fsmail.net
07730 523179


More information about the AccessD mailing list