I am writing a program in C++, and I need it to write to a new file. I'm know how to do this part, but I want to avoid overwriting files, or atleast warn the user that a particular file exists. Can I code this in C++? Can I run shell scripts within a C++ program? I ask because I see scripts doing a similar checks, and I could use that code as an example to go by. Thanks, Don