Directory listings

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  Stewart Hyde 11 months, 3 weeks ago.

  • Author
    Posts
  • #54925

    Stewart Hyde
    Participant

    Hi. Hopefully someone can help me. I would like to run a powershell script that will tell me:
    1. A list of hidden files, recursively, on a volume. No other attributes should be included (system etc).
    2. It should show the date accessed
    3. It should be output to a text or csv file that I can then filter or
    4. the output should have a "files older than" filter on it.

    The eventual outcome of this is to run a delete command on the hidden files over a certain age. To do this the filename should include the full path to the file.

    Or any other suggestions!

    Thanks for your help

  • #54926

    Dan Potter
    Participant

    This forum is for help with powershell. You have to do the legwork.

  • #54927

    Stewart Hyde
    Participant

    Sorry, I thought I was asking for help.

  • #54929

    Dan Potter
    Participant

    Post the script that isn't working.

  • #54931

    Stewart Hyde
    Participant
     Get-ChildItem . -Attribute H+!S -recurse | select-object lastwritetime,lastaccesstime,directoryname,name > recurse.txt 

    The output of this gives me a text file but the directory name and file name fields are shortened to 26 characters each with 3 dots on the end. I would like to have the full path and filenames if poss.

    Thanks

You must be logged in to reply to this topic.