powershell - String comparisons not comparing -
I am trying to run a PowerShell script to delete some files in a directory. To be able to remove this name from me, it should be In my tests subdirectory, I have several files with the same name I though when I execute the following code: It does not select any item. I have a triple check to make sure that I am in the correct directory When the script is executed, edit as I have been told. I am included in correctly My confusion. My comment (again with some background) again on the author's request. quote: In short, My idea is that blahblahblah .
$ itemsToDelete = get-childItem- Path $ pathName | Where {$ _. Name-blahblabla} "
wrong way and I am using.
$ itemsToDelete = get-childItem-path $ pathName | where {(includes $ _. name) .In ( "Blablablah")} < / Pre>
archival Description: the prevention tells the operator. that includes a collection of test values of reference values. forever Boolean value. the reference values At least one. When the value of the test is a collection, the operator involved in it uses the reference equation. B returns returns when one of the values in the test is an example of an example object
-compatible does not tell you that a There is a special sub-string in the string. You want
-Match or
-write for it to note that
-Match assumes your test value so that you need to avoid special characters Ho.
-complete is neither very intuitive nor very helpful theoretically it is understandable to speak such things if you support the idea, but one They are somewhat higher for the script language.
Comments
Post a Comment