![]() Therefore WinRAR.exe is used in batch file code below. WinRAR.exe supports creation of RAR and ZIP archives and extraction of multiple archive types. Rar.exe supports only RAR archives as documented at top of its manual Rar.txt in program files folder of WinRAR. If /I not "%%~nxI" = "done" if not exist "%%I\*.rar" if not exist "%%I\*.zip" move /Y "%%I" "%SourceFolder%\done\" >"%LogError%" call echo Error %%ErrorLevel%% on extracting "%%ArchiveFile%%"Įcho %%~nJ| %SystemRoot%\System32\findstr.exe /I /R "\.part*$" >nul Set "LogExtract=%SourceFolder%\ExtractionLog.txt" Setlocal EnableExtensions DisableDelayedExpansion The following code taken from Mofi's answer from initial version of the question and adapted by me did not work. But folders not containing any archive file should not be moved by the batch file. I want to move every folder to done folder after the decompression is successful. If there is an error on extracting an archive, the archive file name should be written to an error log file and extraction process should continue with the next archive file(s). ![]() Furthermore, I want to delete the original compressed file only if there is no error during decompression. I want to extract ZIP and RAR archives existing in each folder to the respective folder at the command line. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |