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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Command line batch file help

  • 10-07-2012 1:43pm
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 2,494 ✭✭✭kayos


    del /? will show you the light


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


    deltree?


  • Registered Users, Registered Users 2 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, Registered Users 2 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