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,
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).