Thread: deleting a document ...

  1. #1
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273

    deleting a document ...

    Hi, I have a program which makes a bat file, then runs that, and then it finishes. it's not all that elaborate to be honest, but it's fun ... it makes use of the net send operation .

    Anyways, I want a way to delete this file from the computer after the computer has finished running it ... does anyone know how to do that, I'm using windows XP and the compiler is microsoft visual c++ ... cheers

    twomers

    PS I can post up the code if you need it!

  2. #2
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    PPS I tried saying

    system("del spam.bat");

    and that didn't work

  3. #3
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    Sorry, I fixed it, I had it in the wrong part of the loop and it wouldn't allow me to access it, thanks anyways!

  4. #4
    Registered User
    Join Date
    Dec 2005
    Location
    the Netherlands
    Posts
    5
    You can also use "#include <cstdio>" and "remove (filename)" to remove your files.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Document Class and Dialog Windows :: MFC
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 12-01-2002, 12:27 AM
  2. need help deleting a deleting a struct from file
    By Unregistered in forum C Programming
    Replies: 5
    Last Post: 05-20-2002, 05:38 AM
  3. MultiDocument And MultView (and per document) :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 04-09-2002, 09:00 AM
  4. Scanning a line in a document
    By bc120 in forum C Programming
    Replies: 5
    Last Post: 01-02-2002, 02:06 PM
  5. Getting document point co-ordinates
    By swordfish in forum C++ Programming
    Replies: 2
    Last Post: 09-05-2001, 12:37 PM