Stata 中一般使用 unzipfile 進行解壓縮,但是unzipfile也有局限,可以使用 winexec和shell在 Stata 調(diào)用系統(tǒng)命令行進行進階操作。
?? 知識點:unzipfile、winexec、shell
-
unzipfileunzipfile filename.zip, replace- 如果壓縮包下面的子目錄是文件夾的話,就不能壓縮成功;其子目錄必須是文件
-
winexec- 在 Stata 中調(diào)用其他軟件進行操作
- 使用 Bandizip 打開
.zip文件:winexec "C:\Program Files\Bandizip\Bandizip.exe" "filename.zip"
-
shell- 在 Stata 中調(diào)用系統(tǒng)命令行進行交互操作
shell 7z x "filename.zip" -o"filename"- 推薦閱讀:Windows下使用命令行解壓和壓縮zip

文章梗概