Knightmare Report post Posted July 15, 2018 I'm trying to figure out how to delete a subfolder that is created when I download FixWin 10. I have the program set to extract the zip folder into a FixWin folder that I have created using the 7z e command to ignore the original structure; however, if a new version is released, the folder named after the version, so I'm left with an empty folder in my FixWin folder with the version name. Currently, it is 10.0.1.0. If a new version comes out, then the name of that folder will change and when I update, I believe that I will have two empty folders: one with the old version name and the other with the new version name. I would like to delete the empty folder during extraction but I don't know how to do that. Any help? Share this post Link to post Share on other sites
shawn Report post Posted July 17, 2018 i've never used FixWin. are there subfolders below the versioned folders? such as "10.0.1.0\something\file.ext"? if not, then you can just extract the entire contents of the zip file into the FixWin folder, overwriting with new data. your first post-download command should be doing that already: 7z e "{file}" -o"{root}SyMenu\ProgramFiles\FixWin" -y that said, you could always use a for loop to do it instead: for /f "delims=" %%d in ('dir "{root}SyMenu\ProgramFiles\FixWin" /s /b /ad ^| sort /r') do rd "%%d" or robocopy: ROBOCOPY "{root}SyMenu\ProgramFiles\FixWin" "{root}SyMenu\ProgramFiles\FixWin" /S /MOVE good luck! Share this post Link to post Share on other sites
Knightmare Report post Posted July 19, 2018 There are not any subfolders; however, when the zip file contains the files in a folder. When I do 7z e, it takes out the contents of the folder and puts them in the FixWin folder that I have along with the folder that it emptied: When I unzip it with the commands that I show in my first post, I get this: Since I don't need the Internet shortcut or the Text Document, my work around is this: 7z e "{file}" -o"{root}SyMenu\ProgramFiles\FixWin\" *.exe *.dll -r -y Share this post Link to post Share on other sites
shawn Report post Posted July 24, 2018 that's exactly how i would work around the problem Share this post Link to post Share on other sites