renaming a text file as a batch file

  • Thread starter Thread starter David Kennedy
  • Start date Start date
D

David Kennedy

Hi ,

I have a button on a form that exports a table(containing dos commands) as a
text file :
(I cannot export as .bat so I am exporting as .txt)

DoCmd.TransferText acExportFixed, "BatchFile_ExpSpec", "12_BatchFile",
"C:\CDE\pecfileA.txt"
??????????


Can anyone advise me how to change the pecfileA.txt file to pecfileA.bat
using code
I have tried DoCmd.Rename but it doesnt work

Thanks in advance

David K
 
DoCmd.Rename is an Access command for renaming Access objects (e.g. tables,
queries, forms and reports). To rename an external file, use the VBA Name
statement ...

Name "c:\cde\pecfilea.txt" As "c:\cde\pecfilea.bat"
 
Back
Top