windows - Batch unzip file with condition and basic file TXT read -


i've been playing batch programming lately, let me explain whole idea, , i'll write i'm stucked.

i recieve numeber of zip files via ftp in c:\test

i wanted unzip content, contain other zipped files. @ point, want elaborate subset of files, according name containing lsp or lsg or lsp021 or lsg021

 [*lsp*.*,*lsg*.*,*lsp021*.*,*lsp021*.*] 

when find file matching have

  • unzip
  • open ,reading 10 char on date,
  • append date name of file
  • finally move in folder.
  • (erase every temp)

where i'am :

  rem loop through zips  /r "c:\test\" %%c in (*.zip) (`enter code here`     rem make temporary folder same name zip house zip content     if not exist %%~nc md %%~nc     rem extract zip content temporary folder     7za e -o"%%~nc" %%c     if exist "%%~nc" (         rem jump temporary folder         pushd "%%~nc"         if exist *.* (             rem loop through files found in temporary folder , prefix zip's name             %%i in (*.*) (                 ren "%%i" "%%~nc.%%i"             )          )         rem jump out of temporary folder         popd     ) 


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -