Tags "get-childitem" Result

Get-ChildItem -Filter Array

Situation: Get-ChildItem $Path -Filter *.dll works for me This works: $Path = "$env:windir\system32\*" $GuyArray = @("*.dll", "*.exe") Get-ChildItem $Path -Include $GuyArray But I cannot get this working: $Path = "$env:windir\system32\*" $GuyArray = @("*.dll", "*.exe") Get-ChildItem $Path -Filter $GuyArray Error message: Cannot conve

it1352 2 2019-05-17

use get-childitem -recurse in powershell but get each full path on a separate line (without extra directory lines)

If I execute, e.g. Get-ChildItem *.ext -recurse the output consists of a series of Directory: entries followed by one entry for each each matching file. That's useful for many purposes, but today I'd like a result (analogous to the Unix find command) in which each matching file appears on a line by itself and shows its full relative path (and

it1352 0 2020-11-10

Get images from post's gallery WordPress 3.5

How to get images from a gallery in a post in WordPress 3.5 as gallery is no longer related to posts in 3.5. get_children() doesnot work as gallery is not attachment. Any help is appreciated. Solution `global $post; $post_subtitrare = get_post( $post->ID ); $content = $post_subtitrare->post_content; $pattern = get_shortcode_regex

it1352 0 2020-09-13

How to do a case-sensitive file search with PowerShell?

Get-ChildItem -Path C:\ -Filter CAPS* finds caps.txt I want to make sure it will only find CAPS.txt (or e.g. CAPS901918.whatever) I've tried find ways to pipe the Filter to an expression like: { $_.What_I_just_said_to_filter_on -like [A-Z] } or suppress output after receiving results but I have found nothing. Solution try piping Get-Child

it1352 0 2020-09-29

List folders and files in a UNC root folder

I am trying to get folders and files from the root of a UNC path name. I am using Get-ChildItem. I can get results from a subfolder via the UNC path, but not the root folder. If run the command Get-ChildItem \\sf1\user1 from the command line, results are returned. Directory: \\sf1\user1 Mode LastWriteTime Length Name ----

it1352 0 2020-10-22

Move files up one folder level

I have a folder called "April reports" that contains a folder for each day of the month. Each folder then contains another folder which contains PDF files: April reports ├─01-04-2018 │ └─dayreports │ ├─approved.pdf │ └─unapproved.pdf │ ├─02-04-2018 │ └─dayreports │ ├─approved.pdf │ └─unapproved.pdf ╎ ╎ └─30-04-2018 └─dayreports ├─ap

it1352 1 2020-07-22