Results 1 to 6 of 6

Thread: Dos

  1. #1
    SG DC Team Member lance-tek's Avatar
    Join Date
    Apr 2001
    Location
    Indianapolis, IN
    Posts
    5,601

    Dos

    I need some fast help........ I want to delete a directory without a prompt. if I do a "deltree filename" it asks if I want to delet it y/n?


    same thing if I try to "del foldername"

    So I am asking if anyone can tell me how to write a script or what have you to get around the prompt?
    A mistake does not become an error until one refuses to correct it

    Folding for the future

  2. #2
    Regular Member BadEditor's Avatar
    Join Date
    Dec 1999
    Location
    Lost...
    Posts
    315
    You wound Enter deltree /Y (then the location)


  3. #3
    Senior Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    8,585
    use a batch file if you want a script

    ииии



    ииии

  4. #4
    SG DC Team Member lance-tek's Avatar
    Join Date
    Apr 2001
    Location
    Indianapolis, IN
    Posts
    5,601
    THANK YOU BadEditor that is exactly what I was looking for

    PING that was the intention, we jsut couldn't get the right command to bypass the prompt

    now that I have it we can go on with the script

    THANKS AGAIN
    A mistake does not become an error until one refuses to correct it

    Folding for the future

  5. #5
    If you put a /? behind many DOS commands, you get command line switch information. For example:

    C:\WINDOWS\Desktop>deltree /?
    Deletes a directory and all the subdirectories and files in it.

    To delete one or more files and directories:
    DELTREE [/Y] [drive:]path [[drive:]path[...]]

    /Y Suppresses prompting to confirm you want to delete
    the subdirectory.
    [drive:]path Specifies the name of the directory you want to delete.

    Note: Use DELTREE cautiously. Every file and subdirectory within the
    specified directory will be deleted.

    C:\WINDOWS\Desktop>

    -JmE-

  6. #6
    Member
    Join Date
    Apr 2000
    Location
    Burnaby, BC, Canada
    Posts
    83
    Another way to do it that is much more fun that using /Y is to use: echo y | deltree <directory>. This will work with ANY dos command, such as echo y | format c: /u. Note that the | is the pipe character...should be shift-\.

Bookmarks

Posting Permissions

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