Hi all,
I have a routine that renames several .dat files received from a client and also counts the lines in each one. However, I find myself needing to open in word pad and do a save as, presumably because there is a need to replace vbCr with vbCrLf. I found a vbscript method of fixing this at this thread - thread329-1240224
I am trying to convert this to access, but cannot find the command to tell filesystemobject to save. Here is the applicable code:
Any advice would be greatly appreciated.
Thanks,
Alex
Professor: But what about your superintelligence?
Gunther: When I had that there was too much pressure to use it. All I want out of life is to be a monkey of moderate intelligence who wears a suit. That's why I've decided to transfer to Business School.
Professor: NOOOOOOOOOOOO.
I have a routine that renames several .dat files received from a client and also counts the lines in each one. However, I find myself needing to open in word pad and do a save as, presumably because there is a need to replace vbCr with vbCrLf. I found a vbscript method of fixing this at this thread - thread329-1240224
I am trying to convert this to access, but cannot find the command to tell filesystemobject to save. Here is the applicable code:
Code:
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(folderspec) 'Specify Folder
Set fc = f.Files
for each f1 in fc
'only applicable code included
Set ots = f1.OpenAsTextStream(1)
'is it a problem with my OpenAsTextStream constant?
s2 = Replace(ots.readall, vbCr, vbCrLf)
'what to put here to save? first guess was ots.save
ots.Close
Any advice would be greatly appreciated.
Thanks,
Alex
Professor: But what about your superintelligence?
Gunther: When I had that there was too much pressure to use it. All I want out of life is to be a monkey of moderate intelligence who wears a suit. That's why I've decided to transfer to Business School.
Professor: NOOOOOOOOOOOO.