Thread: Program that modifies directories

  1. #16
    Registered User
    Join Date
    Sep 2002
    Posts
    16
    Wait, I used DEL.

    I typed

    "DEL C:\FTPROOT"

    And it said..
    Could not find "C:\mikeprogs\prog4\FTPROOT"

    Why is it putting mikeprogs\prog4 in front of it? How can I prevent this?
    Signed,
    Next Gen

  2. #17
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    You didn't try to enter that in your system() program did you?

    Forget system() as I said before, it is a crude bodge, (there are a list of reasons why you should not use it in the FAQ). You use RemoveDirectory instead of system()! You have VC, open the help and look up the routine there.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #18
    Registered User
    Join Date
    Sep 2002
    Posts
    16
    Yeah but, why is it putting that? All I need is to erase that and I basically accomplished what I set out to do.
    Signed,
    Next Gen

  4. #19
    Registered User
    Join Date
    Jun 2003
    Posts
    22
    DEL *.*

    This will delete all files in the current directory, be careful what you delete.

  5. #20
    Registered User
    Join Date
    Sep 2002
    Posts
    16
    So type "DEL *C:\FTPROOT*
    Signed,
    Next Gen

  6. #21
    Registered User
    Join Date
    Jun 2003
    Posts
    22
    and if you are putting delete commands inside system remember you need 2 backslashes....

    doDOS("DEL C:\\and so on...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 01:41 PM
  2. Replies: 4
    Last Post: 02-21-2008, 10:39 AM
  3. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  4. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM