NAORC
asked on
Renaming File Types
Hi Guys.. easy one for y'all..
I have a program that feeds lines of text into a .txt file (C:\update.txt)
the way i have designed it to output the results means if i change the file extension to .bat, it will become a working batch file. how do i change the extension in vb6?
I do have filesystemobject setup and running :)
I have a program that feeds lines of text into a .txt file (C:\update.txt)
the way i have designed it to output the results means if i change the file extension to .bat, it will become a working batch file. how do i change the extension in vb6?
I do have filesystemobject setup and running :)
Why not create the file as C:\update.bat in the first place?
ASKER
Set m_destTS = m_fso.CreateTextFile("C:\O RCGravity\ update.txt ", True)
^^throws up errors if i do^^
^^throws up errors if i do^^
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
"how do i change the extension in vb6?"
In VB6, you can use the Name function to rename a file:
Dim oldFileName As String
Dim newFileName As String
oldFileName = "c:\someFile.txt"
newFileName = "c:\someFile.bat"
Name oldFileName As newFileName
In VB6, you can use the Name function to rename a file:
Dim oldFileName As String
Dim newFileName As String
oldFileName = "c:\someFile.txt"
newFileName = "c:\someFile.bat"
Name oldFileName As newFileName