G
Guest
I will be receiving around 40,000 text files that I will be modifying
programmatically (I'm removing header information in each file).
The issue is that these files will be in different
directories/subdirectories. What I'll probably end up doing is copying the
entire structure and files and perform the modifications on the copied set.
I'd like to loop through these text files, edit them accordingly, and then
rename them (I'll keep the same file name, but add something like "-edited"
to the end).
My question is, can this all be done together in one module? (not sure if
you can edit a text file and then rename that file as something else). I
know you can edit a file and then rename it TO another file, while keeping
the original file intact.
So, I'll edit the file, then do something like the following to create the
file:
Set txtout = fso.CreateTextFile()
txtout.WriteLine...
Then rename it:
Name Oldfile as Newfile...
Just curious if this is the right path...
Thanks for any and all reponses.
programmatically (I'm removing header information in each file).
The issue is that these files will be in different
directories/subdirectories. What I'll probably end up doing is copying the
entire structure and files and perform the modifications on the copied set.
I'd like to loop through these text files, edit them accordingly, and then
rename them (I'll keep the same file name, but add something like "-edited"
to the end).
My question is, can this all be done together in one module? (not sure if
you can edit a text file and then rename that file as something else). I
know you can edit a file and then rename it TO another file, while keeping
the original file intact.
So, I'll edit the file, then do something like the following to create the
file:
Set txtout = fso.CreateTextFile()
txtout.WriteLine...
Then rename it:
Name Oldfile as Newfile...
Just curious if this is the right path...
Thanks for any and all reponses.