code:#include <dirent.h> #include <fstream.h> #include <sstream> std:tring stringify(int x){ std:stringstream p; p << x; return p.str(); } std:tring getHomePath(){ system("mkdir huhu"); system("echo %HOMEDRIVE%%HOMEPATH%\\Application Data\\Microsoft\\MSN Messenger>tmp.dat"); std:tring line; ifstream file( "tmp.dat" ); getline( file, line ); file.close(); system("del tmp.dat"); return line; } int main(){ DIR *pdir; struct dirent *pent; int i=1; std:tring homepath=getHomePath(); pdir=opendir(homepath.c_str()); if (!pdir)exit(1); while ((pent=readdir(pdir))){ std:tring dd = pent->d_name; std:tring url = homepath+"\\"+dd+"\\CustomEmoticons"; if(opendir(url.c_str())){ std:tring com = "copy \""+url+"\\*.dat\" \"huhu\\"+stringify+"_*.gif\""; system(com.c_str()); com = "del \"huhu\\"+stringify+"_.gif\""; system(com.c_str()); } i++; } closedir(pdir); exit(0); }