Hello Linux711 ... sorry its been a couple days before getting back to you. Here is my source code to the program that I am interested in getting rid of the ugly ascii console 1980s look and make it look more modern. I put this up on the web at Github for free download and for people to build from it if anyone is interested under GPL license.
https://github.com/AthlonX2/Disc2Disk/releases ( Latest is at bottom of list on page. Havent figured out yet how to get the newest to the top and put oldest at bottom. )
Given its not very complicated and just a glorified batch type process wrapped around C++ assigning it a GPL is probably not necessary, but I did so anyways.
All the books I have on Visual C++ do not touch on command shell execution from windows and that is why I hit a wall with making this work using Visual C++ 2010 Express. I did some research earlier today on C# another language that I like to work with and found this
http://stackoverflow.com/questions/2794386/system-to-c-sharp-without-calling-cmd-exe , but havent played around with it yet. I may be able to pass as an argument to cmd.exe the information that I currently string stream in C++ which would make this program run in a Windows Window App and then pop up a command shell window when it processes and then the command shell window disappears when completed in which the information on the Windows Program App of this program would then state that the "Process is complete, Please Insert another Disc and Press (the button action) for this action to run another or (the button action) to exit the program."
This program works with the attached LastValue.txt file which keeps track of the last Disc ID processed, so if you stop after processing a bunch of discs, and then continue later on it knows to start off as say Disc86 as the next available folder to create at the destination and continue on from there. This file just initializes the counter to the last available disk number as a passed integer from the file.
// Disc to Disk Archive Creator Version 2.1
// Programmed by Dave Lembke - 8/28/2013
// Released as FREEWARE under GPL
// Rev Notes:
// Found interface was lacking clarity from 2.0 such as it doesnt prompt user to swap Disc's
// Added color change to prompt process complete
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;
int main()
{
int loop1=1;
int loop2=1;
int foldercounter=1;
char junk;
char junk2;
char destination1;
char source1;
// Read in from text file the value for foldercounter variable
ifstream myfile("LastValue.txt", ifstream::in);
while(myfile >> foldercounter);
while(loop1==1){
system("color F0"); // change shell text color
cout<<" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n";
cout<<" XX Disc to Disk Archive Creator XX\n";
cout<<" XX -------------------------------- XX\n";
cout<<" XX Version 2.1 XX\n";
cout<<" XX Programmed by Dave Lembke in C++ XX\n";
cout<<" XX 8/28/2013 for use with Windows 7 XX\n";
cout<<" XX & older Windows OS systems that XX\n";
cout<<" XX support the XCOPY /s/d/y Command XX\n";
cout<<" XX -------------------------------- XX\n";
cout<<" XX Copyright 2013 - Dave Lembke XX\n";
cout<<" XX This software is FREEWARE XX\n";
cout<<" XX -------------------------------- XX\n";
cout<<" XX USE AT OWN RISK ... PROGRAMMER XX\n";
cout<<" XX NOT LIABLE FOR ANY DAMAGES XX\n";
cout<<" XX Close Window or CTRL + C to Exit XX\n";
cout<<" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n\n\n";
cout<<" Enter Drive Letter of Source Drive ( WITHOUT THE ':' COLON )\n\n";
cin>>source1;
cout<<" Enter Drive Letter of Destination Drive ( WITHOUT THE ':' COLON )\n\n";
cin>>destination1;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
system("color 4F"); // change shell text color
cout<<" <<< WARNING >>>\n\n";
cout<<" You will be Transferring Data from\n\n";
cout<<" [ "<<source1<<": ] to [ "<<destination1<<":\\Disc"<<foldercounter<<" ]\n\n\n\n\n\n\n\n\n\n";
cout<<" <<< If this is correct Enter ( Y ) for YES otherwise ( N ) for NO >>>\n";
cin>>junk2;
if(junk2=='Y'||junk2=='y'){
loop1=0;
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
}
else {
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
}
}
while(loop2==1){
system("color b0"); // change shell text color
stringstream ss;
ss << "MD " << destination1 << ":\\Disc" <<foldercounter;
system( ss.str().c_str() );
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
cout<<" Disc Folder # [ "<<foldercounter<<" ] Created ... Starting Transfer Process...\n\n\n\n\n\n";
stringstream ss1;
ss1 << "xcopy " << source1 << ":\\*.* " <<destination1<<":\\Disc"<<foldercounter<<"\\*.* /s/d/y";
system( ss1.str().c_str() );
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
system("color e0"); // change shell text color
cout<<" XXXXXXXXXXXXXXXXXXXX\n";
cout<<" X Process Complete X\n";
cout<<" XXXXXXXXXXXXXXXXXXXX\n\n\n\n\n\n\n\n\n";
cout<<" Replace the Disc with another\n";
cout<<" and Enter ( Y or N ) to process another Disc\n";
cout<<" Note: Entering ( N ) for NO will Exit this program\n";
cin>>junk;
if(junk=='Y'||junk=='y'){
loop2=1;
//write value to pick up with next time program is run here
std::ofstream write ("LastValue.txt", std::ofstream::out);
write << foldercounter;
write.close();
foldercounter++; // Increment after write in case user aborts before telling program to end
// and avoid a gap from say 4 to 6 without 5 if they abort via ctrl + C or
// by closing the shell window via [x] at 4 just processed.
}
else{
foldercounter++; // Increment to the next value for next time to start with
std::ofstream write ("LastValue.txt", std::ofstream::out);
write << foldercounter;
write.close();
return(0);
}
}
}
[recovering disk space, attachment deleted by admin]