deleting a document ...

This is a discussion on deleting a document ... within the C++ Programming forums, part of the General Programming Boards category; Hi, I have a program which makes a bat file, then runs that, and then it finishes. it's not all ...

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

    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,262
    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,262
    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, 06:38 AM
  3. MultiDocument And MultView (and per document) :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 04-09-2002, 10: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, 01:37 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21