William Hindman
wdhindman at dejpolsystems.com
Mon Aug 7 09:37:05 CDT 2006
...from VBA "Help" Dim OldName, NewName OldName = "OLDFILE": NewName = "NEWFILE" ' Define file names. Name OldName As NewName ' Rename file. ...FMS has some more elaborate code that should give you a running start http://www.fmsinc.com/free/newtips/Access/accesstip31.asp ...hth William ----- Original Message ----- From: "Darren DICK" <darrend at nimble.com.au> To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> Sent: Monday, August 07, 2006 9:15 AM Subject: [AccessD] A2003:Rename Files in a folder > Hi all > > I have to loop through a folder and rename all the files in it to have > some text > as a prefix > > For EG there may be a folder C:\CoolFolder > In it may be 5 files or 5000 files that are all sequentially numbered and > named > like... > 1012.pdf, 1013.pdf, 1014.pdf etc etc > > What I need to do is loop all the files and add a prefix such as "inv" so > the > file names become > inv1012.pdf, inv1013.pdf, inv1014.pdf etc etc > > Any pointers - anyone got any file renaming snippets they'd care to share? > > many thanks in advance > > Darren > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >