recursion - Command Line For Loop returns path that is missing last subdirectory -


i'm trying use loop recursively extract zip files in folder multiple levels , zips within zips. when run error message because last sub directory blank looks c:\users\johnsmith\desktop\testing\\ , says cannot create output directory. had thought had had working earlier guess missed something. , help!

here i'm running:

for /r "c:\users\johnsmith\desktop\testing\" %i in (*.zip) (7z x "%i" -aou -o\"%~dpi\" && del \"%~fi\") 

i guess there \" survivals of escaping sequences in command if call within program. no such need (and harmful) in pure cmd.

as per 7-zip command line version user's guide use -o"%~dpi" (remove backslashes); same in del "%~fi" follows

for /r "c:\users\johnsmith\desktop\testing\" %i in (*.zip) (7z x "%i" -aou -o"%~dpi" && del "%~fi") 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -