在Powershell中匹配运算符后重新获得路径属性

时间:2017-04-26 17:21:03

标签: powershell

所以,我一直在研究以下代码,我在这里得到了一些很好的帮助,我很感激。此代码将打开Word或Text文档,拉出特定模式,并返回该数字。现在,我遇到的唯一问题是,在使用匹配运算符后,我无法弄清楚如何使用完整路径返回实际文件名。我剩下的就是与范围相匹配的实际数字。任何帮助将非常感激。

create or replace function clob2blob(AClob CLOB) return BLOB is
  Result BLOB;
  o1 integer;
  o2 integer;
  c integer;
  w integer;
begin
  o1 := 1;
  o2 := 1;
  c := 0;
  w := 0;
  DBMS_LOB.CreateTemporary(Result, true);
  DBMS_LOB.ConvertToBlob(Result, AClob, length(AClob), o1, o2, 0, c, w);
  return(Result);
end clob2blob;
/

update my_table t set t.hash = (rawtohex(DBMS_CRYPTO.Hash(clob2blob(t.content),2)));

1 个答案:

答案 0 :(得分:0)

您可以使用计算属性来引用$wd.FullName

$_.Range.Text | Where-Object {
    ($_ -match$SearchText) -and 
    ($_-notmatch $NOMATCH) -and 
    ($_-notmatch $NOMATCH2)
} | Select-Object @{Label='Number';Expression={$_}},@{Label='Path';Expression={$wd.FullName}}