
這就是我正在做的事情:我瀏覽了我的 Firefox 書籤並刪除了我不再需要或想要的內容。我使用了“FireShot”插件並將 200 多篇添加書籤的文章保存為.pdf
文件。現在我被諸如FireShot Capture ### - Name of article.pdf
.
我想刪除FireShot Capture ### -
某些標題中的隨機數字。我甚至還缺少一些數字。
這是我用「Notepad++」所做的:
我轉到“下載”“FireShot”“FireShot Capture”,然後在選擇全部後使用“右鍵單擊+複製為路徑”。然後我將複製的檔案名稱放入“Notepad++”中。
現在我的文件看起來像這樣:
"C:\Users\UserName\Downloads\FireShot\FireShot Capture ### - "Article Name".pdf"
我想刪除C:\Users\UserName\Downloads\FireShot\FireShot Capture ### -
.但由於這 3 個數字都不同,並且與每個檔案名稱的 111 不同,我不知道如何刪除「隨機」數字。
我已經嘗試過\d+
,但它不起作用我已經嘗試過,
C:\Users\UserName\Downloads\FireShot\FireShot Capture \d+ -
但我不知道如何正確執行此操作。
我什至嘗試將其封閉起來\d+
,"
但仍然無法使其工作。
請任何建議。
謝謝你!
答案1
使用 Powershell 或 PowerRename 中找到的動力玩具而不是記事本++。
開啟 Powershell,然後鍵入以下 cmdlet:
cd "C:\Users\UserName\Downloads\FireShot\"
Get-ChildItem | Rename-Item -NewName {$_.Name -Replace '.+\d+\s-\s',''}