ocillmusic Posted October 26, 2005 Report Share Posted October 26, 2005 I have a folder on a shared drive that receives an export from Access daily. How can I get those files everyday to rename them selves with the current date? Thank you. Quote Link to comment Share on other sites More sharing options...
kevin Posted October 26, 2005 Report Share Posted October 26, 2005 Maybe something like this would work as a starting point: If File Exists "dailyreport.csv" Date/Time: Save "YYYYMMDD" into %T1% Rename File or Files: "dailyreport.csv" End If <IFOTH:01:2:x:\data\dailyreport.csv><DT:YYYYMMDDT:01:1:><DOFILE:06:NN:x:\data\dailyreport.csv>dr%T1%.csv><ENDIF> Quote Link to comment Share on other sites More sharing options...
ocillmusic Posted October 26, 2005 Author Report Share Posted October 26, 2005 But what do I put for the new filename to have it grab that T1 variable and keep the file extension. Quote Link to comment Share on other sites More sharing options...
kevin Posted October 27, 2005 Report Share Posted October 27, 2005 The example assumes the file extension is .csv. If the file extension varies, then you can use the Variable Set From File Path command to get the file extension and put it into a variable. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.