Hi All,
I want to rename a file in a C++ Program.
So i am using the system function call as follows .
int amin()
{
string src="Test.txt";
string Dest = "Test_1.txt"
system("mv Src Dest");
}
But if i execute the program the error message saying Src no such file or directory is displayed.
I also tried to do this by calling a shell script in the system function call as follows
int amin()
{
string src="Test.txt";
string Dest = "Test_1.txt"
system("./Move.sh Src Dest");
}
Move.sh is as follows
mv $1 $2
But, again the same error.
Can some one help me to achive this.
thanks in advance
Vikram