Hunted around, but cannot seem to figure this out. What I am trying to do is take a dynamically named file and save it as a standard filename. for instance in a folder we have the following
C:\
elements_201106.txt
elements_201107.txt
elements_201108.txt
These correspond to monthly data dumps.
In access, I would love to have in my code an ability to read the prior months file (so in August 2011 I would grab elements_201107.txt) and rename it to just elements.txt
It should always look to the prior month, so in august, I would be looking at Julys file. I have played with the DoCmd.TransferText but not sure if that is right. Can anyone give me a snippet to play with?
C:\
elements_201106.txt
elements_201107.txt
elements_201108.txt
These correspond to monthly data dumps.
In access, I would love to have in my code an ability to read the prior months file (so in August 2011 I would grab elements_201107.txt) and rename it to just elements.txt
It should always look to the prior month, so in august, I would be looking at Julys file. I have played with the DoCmd.TransferText but not sure if that is right. Can anyone give me a snippet to play with?