turks67 said:
Is there a way to rename all files in a folder with *.tpt to *.txt from a
command button in access?
Use Dir to step through the folder you have selected.
Put this kind of code into the click event of the command button
Dim strFolder As String
Dim strCurrentFile As String
strfolder="C:\blah" '(You can always have the command button bring up the
open file dialog to choose the folder)
strCurrentFile = Dir(strFolder & \*.tpt")
Do Until strCurrentFile = ""
srtCurrentFile= Left(strCurrentFile, Len(strCurrentFile) - 3) &
"txt"
strCurrentFile = Dir '(Move you to the next file in the dir that
has .tpt
Loop