Results 1 to 6 of 6

Thread: deleteing a file

  1. #1

    Thread Starter
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919

    deleteing a file

    i know its a stupid question..but how do i delete a file?
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    WinAPI:
    DeleteFile
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Or (cross-platform):
    Code:
    #include <cstdio>
    using namespace std;
    
    //...
    
    remove("myfile.txt");
    Alcohol & calculus don't mix.
    Never drink & derive.

  4. #4
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    string sFileName = "c:\\abc.txt";
    system("del"+sFilename);

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Sorry daok, but beside that your solution is neither portable nor native, it won't work
    string file = "c:\\abc.txt";
    string command = "del " + file;
    system(command.c_str());
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6

    Thread Starter
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919
    i decided to use doaks, becaus ei need delete all of the .ppm files

    i think that was a best way i had for now...thanks for the help
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width