You must register to post or download hacks.
If you are having any issues, shoot us an email, Contact MPGH Support. As always, have fun and enjoy your stay! - MPGH Staff
Try something like this? 1. #include <stdio.h> 2. #include <stdlib.h> 3. 4. int main (void) 5. { 6. size_t len = 0 ; 7. const char a[] = "c:/a/a.exe" ; 8. const char b[] = "d:/b/b.exe" ; 9. char buffer[BUFSIZ] = { '\0' } ; 10. 11. FILE* in = fopen( a, "rb" ) ; 12. FILE* out = fopen( b, "wb" ) ; 13. 14. if( in == NULL || out == NULL ) 15. { 16. perror( "An error occured while opening files!!!" ) ; 17. in = out = 0 ; 18. } 19. else // add this else clause 20. { 21. while( (len = fread( buffer, BUFSIZ, 1, in)) > 0 ) 22. { 23. fwrite( buffer, BUFSIZ, 1, out ) ; 24. } 25. 26. fclose(in) ; 27. fclose(out) ; 28. 29. if( remove(a) ) 30. { 31. printf( "File successfully moved. Thank you for using this mini app" ) ; 32. } 33. else 34. { 35. printf( "An error occured while moving the file!!!" ) ; 36. } 37. } 38. 39. return 0 ; 40. }