Directory listings

Welcome Forums General PowerShell Q&A Directory listings

This topic contains 4 replies, has 2 voices, and was last updated by

 
Participant
2 years, 6 months ago.

  • Author
    Posts
  • #54925

    Participant
    Points: 0
    Rank: Member

    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

    Participant
    Points: 21
    Rank: Member

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

  • #54927

    Participant
    Points: 0
    Rank: Member

    Sorry, I thought I was asking for help.

  • #54929

    Participant
    Points: 21
    Rank: Member

    Post the script that isn't working.

  • #54931

    Participant
    Points: 0
    Rank: Member
     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

The topic ‘Directory listings’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort