Darren DICK
darrend at nimble.com.au
Tue Oct 24 21:27:43 CDT 2006
Hi Paul That's is so simple - brilliant Many thanks Darren -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Wednesday, 25 October 2006 12:07 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] A2003:Rename a file in a folder Importance: High Darren, Off the tope of my head use the following: Dim strFile As String strFile = Dir(myCoolCSVfile.csv, vbHidden) ' Put the full path before the filename If (strFile<>"" ) then Name myCoolCSVfile.csv As YYMMDDHHMMSS.csv ' Put the full path before the filename and new file name Endif ' Your routine to put the new file into C:\MyCoolFolder Paul Hartland Message Received: Oct 24 2006, 02:58 PM From: "Darren DICK" To: "'Access Developers discussion and problem solving'" Cc: Subject: [AccessD] A2003:Rename a file in a folder Hi all I have a file that will be always named the same - EG myCoolCSVfile.csv It will be dumped into a folder...say C:\MyCoolFolder at random times I need some code to Check the C:\myCoolFolder to see if the file myCoolCSVfile.csv file exists in the folder - and if it does to rename it to YYMMDDHHMMSS.csv Where YY = Year MM = Month DD = Day etc etc Does anyone have anything that might suit? 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com