Results 1 to 7 of 7

Thread: command line to delete folder contents

  1. #1
    Sebastian4 is offline Beginner
    Join Date
    May 2012
    Posts
    10

    Default command line to delete folder contents

    What line in a batch file would delete the contents of
    C:\Users\MyName\AppData\Local\Microsoft\Windows\Te mporary Internet Files\ ?
    del /F /S /Q /A "C:\Users\MyName\AppData\Local\Microsoft\Windows\T emporary Internet Files\*.*"
    fails, so does
    del "C:\Users\MyName\AppData\Local\Microsoft\Windows\T emporary Internet Files\*.*" /q


  2. #2
    hackerman1 is offline Senior Member
    Join Date
    Dec 2008
    Location
    Sweden
    Posts
    1,525

    Default

    Hi !

    Welcome to the forum.

    I donīt use use CMD.EXE so i canīt tell you how exactly the commands and their switches work.

    I stopped using Command.com / CMD.exe years ago...
    Personally i use TCC/LE Enhance Your Windows Command Line, CMD Batch Files, and Command Prompt Windows which is much better.

    But i see one error in the first command above, there is a switch: /A, if you use that swich then you must also specify the attribut, Read-only, System, Hidden etc.

    Type: "del /?" and take a look...

    I created a folder and copied some files into it, both commands above work when i try them.
    But you have to remove /A from the first.

  3. #3
    Sebastian4 is offline Beginner
    Join Date
    May 2012
    Posts
    10

    Default

    Removing the '/a' did NOT improve response. Thank you for the hint about TCC/LE - I'll investigate it. I suspect my problem has to do with the fact that it is TIF which I am trying to empty - and it may be a 'phantom location' in Win7.

  4. #4
    Sax
    Sax is offline Windows Enthusiast
    Join Date
    Aug 2012
    Posts
    97

    Default

    CMD commands rarely find any use these days.

  5. #5
    hackerman1 is offline Senior Member
    Join Date
    Dec 2008
    Location
    Sweden
    Posts
    1,525

    Default

    Quote Originally Posted by Sax View Post
    CMD commands rarely find any use these days.

    oh, really ?
    personally i run some bat-files daily....
    although TCC not CMD.

  6. #6
    DustinH's Avatar
    DustinH is offline Senior Member
    Join Date
    Aug 2008
    Location
    Boardman, OR
    Posts
    243

    Default

    Are you running the CMD program as an administrator? You may need to do that to be able to have the command run successfully.

  7. #7
    Sebastian4 is offline Beginner
    Join Date
    May 2012
    Posts
    10

    Default

    Quote Originally Posted by DustinH View Post
    Are you running the CMD program as an administrator? You may need to do that to be able to have the command run successfully.
    I have simply run the batch file i.e. double clicked its desktop icon - I have NO idea how to do that 'as administrator'.

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22