here's another idea, im going to skip the error checking
ifstream inFile;
string temp;
vector<string> fileNames, newFileNames;
system("dir /s /b *.mp4 *.avi *.mpeg >> out.txt");
inFile.open("out.txt");
while(inFile){
getline(inFile, temp);
fileNames.push_back(temp);
}//while
inFile.close();
for (int i = 0; i < fileNames.size(); i++){
for (int i2 = fileNames.at(i).size() - 1; i2 >= 0 ; i2--)
if (fileNames.at(i).at(i2) == '.'){
newFilesNames.push_back(fileNames.at(i).substr(0, (fileNames.at(i).size() - (fileNames.at(i).size() - i2 ))
i2 = -1
}//if
}//for
then youd probably want to rename the file
string temp, cmd= "rename ";
for (int i = 0; i < newFileNames.size(); i++){
temp = cmd + fileNames.at(i) + " " + newFileNames.at(i);
system(temp.c_str());
}//for
something along these lines, didnt really get to test it but ive done a similar project before