您的位置:首页 > 运维架构 > Shell

[PowerShell]One line to pack individual PDF file into their BaseName.RAR

2010-07-13 21:33 387 查看
gci *.pdf | % {iex $("rar mf -m5 -rr1 {0}.rar '{1}'" -f $($_.BaseName -replace "\s+","."),$_.Name)}


gci is Alias of Get-ChildItem

iex is Alias of Invoke-Expression

rar is the execution file which default locate at C:\Program Files\WinRAR
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐