I've tried all the fputs, fgets, fopen etc. and I am able to parse through my file one line at a time, reorganize the data but I'm getting a blank file using fputs. I've used VB, VBA, VBscript for years but VFP is just a different creature, at least to me.
Visual Foxpro won't be installed on...
All the advice above works great. I had a curve thrown to me in the 11th hour. Initially I just needed to cycle through a directory and pick up all file names and once I did I would open the first file, find the ~, replace with a , and write out the entire file, overwriting the original, pick up...
Thanks for the feedback JRB. I'm just now getting back on that project, due tomorrow. This is the final piece that will get me accross the finish line :)
Thank you. I have a lot of things scheduled and this has a deadline. I knew there were Foxpro people here that could save me hours and hours of going through a language I haven't dabbled in in more than 10 years. VFP is just so different than the VBA, VBScript, etc. that I'm used to.
I...
The original code pops a prompt and asks if it is OK to overwrite. I think they want this to happen in the background without any user intervention so I was hoping there was a parameter that tells it to "just overwrite and don't ask me" :)
Griff, how that overwrote like you said. How do you overwrite without getting a prompt telling you that the file already exists...do you want to overwrite?
Oh OK. I didn't realize that would overwrite. I read and then gave a new name so I didn't notice that it would overwrite. I'll test that now. Thank you so much.
Thanks GriffMG, you did in a couple of minutes what would have taken me hours of pouring through books and google hits. I appreciate it.
A followup if you don't mind. If I wanted to delete the original file at some point would it be better to just delete the dir where it resides and recreate it...
What would be the simplest way to open a csv file, read the first line, find a ~ and replace with a comma, write that line to a new file and then do the same for each line in the file?
Haven't used VFP in years and am looking for some advice before spending hours with the manuals.
Any help...
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.