+ Post New Thread
Results 1 to 7 of 7
How do you do....it? Thread, Deleting files Via Script in Technical; I am having trouble trying to script delete of files from program files via a script so i can set ...
  1. #1

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,714
    Thank Post
    269
    Thanked 1,116 Times in 1,012 Posts
    Rep Power
    345

    Deleting files Via Script

    I am having trouble trying to script delete of files from program files via a script so i can set it up as a gpo , but i am stuck as i can't work out how to get it to just agree to delete the files and not prompt each time it finds a file. i did look at VBS but it confuses me!

    does any one have a script they can send me?

    Thanks

    Toby

  2. #2

    tmcd35's Avatar
    Join Date
    Jul 2005
    Location
    Norfolk
    Posts
    5,243
    Thank Post
    772
    Thanked 804 Times in 670 Posts
    Blog Entries
    9
    Rep Power
    299
    if you are using the del command in a bat file add '/Y' (not quotes) to the command string. That should auto-answer 'yes' for you.

    Example:

    del C:\* /Y


  3. #3

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,714
    Thank Post
    269
    Thanked 1,116 Times in 1,012 Posts
    Rep Power
    345
    I tried that it just says invalid switch y?

  4. #4

    tmcd35's Avatar
    Join Date
    Jul 2005
    Location
    Norfolk
    Posts
    5,243
    Thank Post
    772
    Thanked 804 Times in 670 Posts
    Blog Entries
    9
    Rep Power
    299
    Ooops, it'd be a /Q then for 'quiet mode'. Really you'd have thought the MS-Dos programmers would have gone for common switches between commands!

  5. Thanks to tmcd35 from:

    glennda (9th March 2010)

  6. #5
    Gerry's Avatar
    Join Date
    Jun 2007
    Location
    North Wales
    Posts
    431
    Thank Post
    60
    Thanked 38 Times in 35 Posts
    Rep Power
    23
    Here's a handy DOS resource:
    MS-DOS help and commands

  7. #6

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,714
    Thank Post
    269
    Thanked 1,116 Times in 1,012 Posts
    Rep Power
    345
    i saw that on google but it was blocked!

  8. #7
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,497
    Thank Post
    101
    Thanked 84 Times in 71 Posts
    Blog Entries
    46
    Rep Power
    37
    another reference site is SS64.com Command line reference

SHARE:
+ Post New Thread

Similar Threads

  1. Deleting all files from users home dirrectorys
    By noser in forum Wireless Networks
    Replies: 14
    Last Post: 1st September 2009, 09:37 PM
  2. Replies: 8
    Last Post: 25th February 2009, 09:50 AM
  3. Script not deleting/adding printer correctly
    By dave.81 in forum Scripts
    Replies: 2
    Last Post: 5th June 2008, 01:17 PM
  4. Replies: 2
    Last Post: 20th August 2007, 09:52 AM
  5. Error deleting files or folder message
    By speckytecky in forum How do you do....it?
    Replies: 1
    Last Post: 15th November 2006, 02:21 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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