|
-
Aug 2nd, 2007, 02:04 PM
#1
Thread Starter
Hyperactive Member
Change the contents of a text file [VC++6]
Let me try to explain what I am trying to accomplish, and please if you have any suggestions or comments feel free to post them as I am pretty sure this is NOT the best way to solve my problem...
In a folder I have a file "Packages.txt" that will contain information such as:
Package2
Package10
Package3
Package290
In that same folder I will have a list of files that correspond to the names in the "Packages.txt" file, such as "Package2.zip", Package3.zip", etc...
What I need to accomplish is:
- Open Text File and read in the first line (in this case "Package2") & then consume the line (remove it?)
- Apply Package2
- Reboot
- Open Text File and read in the first line (in this case "Package10") & then consume the line (remove it?)
- Apply Package10
- Reboot
- Open Text File and read in the first line (in this case "Package3") & then consume the line (remove it?)
- Apply Package3
- Reboot
... etc ...
So the text file will dictate the order in which to apply the files in the folder ...
Problem is the REBOOT that occurs after applying a package - as it stands (this is where I need help) the text file information doesn't get consumed and therefore "Package2" is always the first line to be read, I need a way to, after reading that line, removing it so the first line becomes "Package10" and so on ... kind of hard to explain ...
Now - this doesn't need to be a TEXT file, just something very simple to fill out and deploy to specify the order in which to apply the packages...
If anyone has any better suggestions...
Any help would be much appreciated.
Thanks,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|