Hi there

I am not sure if any other threads have covered this topic, if so could you point me in the right direction...

I am looking for some code that is used to re-name all files within a certain directory.

something along the lines of

Public sub Change_Name()
Dim File_Path as string

File_Path = "C:/my documents"

'Somehow find all files with a particular extension for me it will be .rep

'then code to change the .rep part to .txt

For "all files in directory??"
Mystring = Left(Myfilename,Instr(1,Myfilename,"."))
Mystring = Mystring & ".txt"
next

End sub

Or would it be easier using replace ?

Any help would be appreciated

Thanks
Steve