Is there a way to read a file, write new info to the beginning and end of the file and then save it? I know how to append to the file, but I need to add to the top of the file also. Any suggestions?
My best bet would be to first READ the file, capture the contents in a variable (for example MyContent). Then manipulate the variable MyContent, and write the manipulated file to the filesystem. Sounds complicated, but check out the following code:
That code worked great! You just saved me about 2 days of work. I had to manually edit a few thousand files and this
just helped me automate the process. I used a loop and cfdirectory to automatically open and edit each file in each directory and insert additional code. Once again, thanks for your help iqof188.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.