Exclude folder from Recurse in Powershell -


i've written following script move mp4 file in particular folder root folder, want script ignore 1 particular folder called "camera". i'm using exclude command no avail. can help?

$ignore = ("*camera*");  get-childitem "c:\root" -exclude $ignore -recurse -include *.mp4 | move-item -dest "c:\root\" 

-exclude filter filename or extension dont think can use filter directories. can try :

gci c:\root\*.mp4 -recurse |where {$_.fullname -notmatch "camera"} 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -