Click here to Skip to main content
14,937,435 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more: (untagged)
can any1 help me with my code because i cant delete and copy a folder but i can copy and delete other file extensions in my code. it would be a great help if you can help me with this cause im new in c++...thank you and godbless.

code for the copy:

C++
#include "stdafx.h"
#include <windows.h>
#include <conio.h>



int _tmain(int argc, _TCHAR* argv[])
{


    CopyFile(argv[1],argv[2],TRUE);


    getch();
    return 0;

}


code for the delete:

C++
#include "stdafx.h"
#include <windows.h>
#include <conio.h>



int _tmain(int argc, _TCHAR* argv[])
{

    DeleteFile(argv[1]);



    getch();
    return 0;

}
Posted
Comments
Sergey Alexandrovich Kryukov 27-Oct-13 15:18pm
   
http://whathaveyoutried.com so far? Your code samples does nothing only shows what you want.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900