Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Command line batch file help

Options
  • 10-07-2012 2:43pm
    #1
    Registered Users Posts: 8


    Hi,

    im trying to find an automated way to delete the contents of a specified folder, sadly this folder is riddled with other sub folders so having to enter yes each time i want to delete the folder wrecks my head and thinking there must be a way to get the command to just delete the folder and everything within it with one press.
    This is for remote

    command i used in command line is below:

    del \\computer\c$\windows\temp\* /s

    my plan is to implement this into a little script that will auto delete that folder when i select the option in the script.
    im thinking there must be a IF command that will watch the command line for "Are you sure (Y/N)?" then enter "y" and enter to continue to next option until all options are finished, any one able to shed some light on this for me please?


Comments

  • Registered Users Posts: 2,494 ✭✭✭kayos


    del /? will show you the light


  • Moderators, Regional Midwest Moderators Posts: 11,094 Mod ✭✭✭✭MarkR


    deltree?


  • Registered Users Posts: 8 longshotmagoo


    tried del /? that gives me the list of options but dont say how to either bypass the confirmation that comes up sadly.

    for some reason deltree dont appear to be recignised even tho its on a windows server 2008 im running the cmd line from.


  • Registered Users Posts: 2,494 ✭✭✭kayos


    tried del /? that gives me the list of options but dont say how to either bypass the confirmation that comes up sadly.

    for some reason deltree dont appear to be recignised even tho its on a windows server 2008 im running the cmd line from.

    You sure?

    /Q Quiet mode, do not ask if ok to delete on global wildcard


Advertisement