gpt4 book ai didi

7zip - 7ZG.exe - 提取特定文件夹的子文件和子目录

转载 作者:行者123 更新时间:2023-12-01 16:15:03 25 4
gpt4 key购买 nike

我有一个带有 filesFolder

的压缩文件

我想提取目录根目录下的所有内容

我试过的命令:

7zG.exe x "zip.7z"-o"C:\location""filesFolder\1""filesFolder\2"

这给了我以下内容:

C:\location\filesFolder\1\*

C:\location\filesFolder\2\*

我想要的是

C:\location\1\*

C:\location\2\*

“e”命令不好,因为它禁用了子文件夹的所有内部顺序

我需要什么命令?谢谢:)

最佳答案

我认为仅使用一个 7-zip 命令无法做到这一点。但是,如果您使用一些 move 命令,这应该是可能的。怎么样:

7zG.exe x "zip.7z" -o"C:\location" "filesFolder\1" "filesFolder\2"
move c:\location\filesfolder\1 c:\location\1
move c:\location\filesfolder\2 c:\location\2

如果 c:\location 中没有其他文件需要担心,您可以使用 for 循环执行此操作:

for /D %F in (c:\location\filesfolder\*) do move %F c:\location

如果 c:\location 中还有您不想移动的其他文件,而您要移动的文件具有顺序后缀,您可以执行如下操作:

for /L %N in (1,1,2) do move c:\location\filesfolder\%N  c:\location\%N

如果您在批处理文件中使用 for 循环,请将 % 替换为 %%。

关于7zip - 7ZG.exe - 提取特定文件夹的子文件和子目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20857480/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com