Thread: Help!!

  1. #1
    Unregistered
    Guest

    Help!!

    Hey im kinda new to programming and im trying to make a dos program for deleting a file in a specified folder. i got that done.. and im just wondering if there is anyway copy the file and paste somewhere else, so i dont have to delete it. just move it

    thanx

  2. #2
    Registered User sean345's Avatar
    Join Date
    Mar 2002
    Posts
    346
    What you need to do is open two files. One for reading and one for writing. Take a byte from the read file and send it to the write file. Continue doing that until you cannot read any more. Then close both files and you have two copies. Do a search to find the actual code because I have seen it posted before.

    - Sean
    If cities were built like software is built, the first woodpecker to come along would level civilization.
    Black Frog Studios

  3. #3
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    He could also use the slow system() function...

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231

    Re: Help!!

    Originally posted by Unregistered
    im just wondering if there is anyway copy the file and paste somewhere else, so i dont have to delete it. just move it
    There's an example of "copy code" here.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed