Jump to content
Sign in to follow this  
cyanidemonkey

FFMPEG batch conversion automator

Recommended Posts

This is a small app I wrote awhile back to batch FFMPEG commands of videos. I have a camcorder that saves to a file type .mts and I wanted to convert them to .mp4 but was too lazy to write out the commands one at a time in the CMD window.

 

ffmpegautomator.gif

NOTES:

  • You will need to download ffmpeg, as it is the application doing the actual conversions (http://ffmpeg.org/).
  • It can only do one directory at a time, it will not do recursive directories.
  • The defaults are set up to convert .mts files to .mp4, if you want to change the input, output and command line options you can, however, you may need to read the documentation at the ffmpeg website.
  • If you want to change the input file type, do this before opening the input browse button.
  • The software will steal focus to communicate with the command line interface, It is best to set up a conversion job and leave the computer alone until it is done (hence the option to shutdown after converting files). If you try to use the computer while it is running chances are it will fail to convert one or more videos. Video processing can be PCU intensive, this application was designed to be set and forget.
  • If you don't want to scale down to 720p remove " -s 1280x720 " from command line, remove " -r 30 " if you don't want the frame rate set to 30fps, if you do not require deinterlacing remove " - vf yadif=1 " from the command line options.
  • You can choose to delete the original video files after they are converted to save disc space, but it pays to test one file first to make sure they convert correctly before batch deleting the original files (they are sent to the recycle bin, so you can restore them until you empty the recycle bin).

 

AutoIt Code:

; Build by Marc Rosewarne 2012
; Works with ffmpeg to automate commandline inputs and converts all files in a selected folder.
;--------------------------------- REQUIRED INCLUDES & GLOBAL VARS -------------------------------------;
Opt("WinTitleMatchMode", 3)     ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
#include <GuiConstants.au3>
#include <GuiListView.au3>
#include <Array.au3>

;----------------------------------------------- MAIN GUI ---------------------------------------------------;
$mainWin = GuiCreate("ffmpeg batch convertion automator", 650, 400)
;VID FILES LOCATION
    GuiCtrlCreateGroup("Input Video File Type and Location", 15, 15, 620, 180)
        $vidFileType = GuiCtrlCreateInput(".mts", 25, 35, 30, 20)
        $vidSourceDir = GuiCtrlCreateInput("Set Input File(s) Location", 60, 35, 500, 20)
        $vidSetSourceDir = GuiCtrlCreateButton("Browse", 565, 34, 60, 22)
        $vidSourceList = GuiCtrlCreateEdit("Video Files: ", 25, 65, 600, 105)
        $vidSourceNum = GUICtrlCreateLabel("Files Found: 0", 25, 173, 110, 15)
        $vidFilesConverted = GUICtrlCreateLabel("Files Converted: 0", 260, 173, 110, 15)
        $vidFilesDeleted = GUICtrlCreateLabel("Files Deleted: 0", 500, 173, 110, 15)
    GUICtrlCreateGroup ("",-99,-99,1,1)  ;close group
; CONVERTION OPTIONS
    GuiCtrlCreateGroup(" ffmpeg.exe Location and Commands ", 15, 200, 620, 100)
        $ffmpegExeLocation = GuiCtrlCreateInput("Set ffmpeg.exe Location", 25, 218, 535, 20)
        $ffmpegBrowseBtn = GuiCtrlCreateButton("Browse", 565, 217, 60, 22)
        GUICtrlCreateLabel("Set ffmpeg commandline: ", 25, 250, 160, 15)
        GUICtrlCreateLabel(" ffmpeg -i [input] ", 25, 270, 80, 15)
        $ffmpegCommand = GuiCtrlCreateInput("-vf yadif=1 -s 1280x720 -r 30 -vcodec mpeg4 -b:v 15M -acodec libmp3lame -b:a 192k", 105, 268, 450, 20)
        GUICtrlCreateLabel("[output].", 560, 270, 40, 15)
        $convertedFileType = GuiCtrlCreateInput("mp4", 600, 268, 30, 20)
    GUICtrlCreateGroup ("",-99,-99,1,1)  ;close group
; EXTRA OPTIONS
    GuiCtrlCreateGroup(" Post Convertion Options ", 15, 310, 620, 40)
        $deleteInput = GUICtrlCreateCheckbox( "Delete original video files", 25, 325)
        GUICtrlCreateLabel("Computer:", 360, 327, 80, 15)
        $o1 = GuiCtrlCreateRadio("Reboot", 420, 323, 50)
        $o2 = GuiCtrlCreateRadio("Shutdown", 485, 323, 65)
        $o3 = GuiCtrlCreateRadio("Nothing", 560, 323, 60)
        GuiCtrlSetState(-1, $GUI_CHECKED)
    GUICtrlCreateGroup ("",-99,-99,1,1)  ;close group

; GO! BUTTON
    $startVidExport = GUICtrlCreateButton(">>> Convert Video Files >>>", 15, 363, 620, 22)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $proggy = GuiCtrlCreateProgress(15, 363, 620, 22)
    GUICtrlSetState($proggy, $GUI_HIDE)
GUISetState(@SW_SHOW)

;---------------------------------------------- FUNCTIONS -------------------------------------------------------;
Func vidSourceDir()
;---SET SOURCE FILE LOCATION
    $message = "Select folder/drive location to find " & StringUpper(StringTrimLeft(GUICtrlRead($vidFileType), 1)) & " files."
    $var = FileSelectFolder($message, "")
    If @error Then
        MsgBox(4096,"","No Folder Selected!")
        Return
    Else
        GUICtrlSetData($vidSourceDir, $var)
        GUICtrlSetData($vidSourceList, GUICtrlRead($vidSourceList) & @CRLF & " > Analysing directory structure - please wait...")
    EndIf
;---ERROR CHK REQUIRED FIELDS B4 MOVING ON
    If GUICtrlRead($vidSourceDir) = "" OR GUICtrlRead($vidSourceDir) = "Set Input File(s) Location" Then
        MsgBox(64, "User Error", "No Source Location Set." & @LF & "Requested action will now terminate.")
        Return
    Else
        If NOT FileExists(GUICtrlRead($vidSourceDir)) Then
            MsgBox(64, "User Error", "The Source Location Does Not Exsist." & @LF & "Requested action will now terminate.")
            Return
        EndIf
    EndIf
;---SEARCH FOR FILES IN SELECTED DIRECTORY
    $fileTotal = DirGetSize( $var,1)
    Global $fileCount = 0
    Global $vidSourceFiles[$fileTotal[1]][2]
    $search = FileFindFirstFile(GUICtrlRead($vidSourceDir) & "\*" & GUICtrlRead($vidFileType))
    $var = GUICtrlRead($vidSourceDir)
    GUICtrlSetData($vidSourceList , StringUpper(StringTrimLeft(GUICtrlRead($vidFileType), 1)) & " Files: ")
    findvidFiles($search, $var)
    If $fileCount <> 0 Then
        ReDim $vidSourceFiles[$fileCount][2]
    EndIf
    FileClose($search)
    If $fileCount <> 0 Then
        GUICtrlSetState($startVidExport, $GUI_ENABLE)
    EndIf
EndFunc

Func ffmpegExeLoc()
;---SET FFMPEG.exe LOCATION
    $message2 = "Select ffmpeg.exe location."
    $var2 = FileOpenDialog($message2, @ProgramFilesDir & "\", "(ffmpeg.exe)")
    If @error Then
        MsgBox(4096,"","No Folder Selected!")
        Return
    Else
        GUICtrlSetData($ffmpegExeLocation, $var2)
    EndIf
;---ERROR CHK REQUIRED FIELDS B4 MOVING ON
    If GUICtrlRead($ffmpegExeLocation) = "" OR GUICtrlRead($ffmpegExeLocation) = "Set ffmpeg.exe Location" Then
        MsgBox(64, "User Error", "No FFMPEG.exe Set." & @LF & "Requested action will now terminate.")
        Return
    Else
        If NOT FileExists(GUICtrlRead($ffmpegExeLocation)) Then
            MsgBox(64, "User Error", "The FFMPEG.exe Location Does Not Exsist." & @LF & "Requested action will now terminate.")
            Return
        EndIf
    EndIf
EndFunc

Func findvidFiles($search, $var)
;---FIND FILES & ADD TO ARRAY CALLED BY vidSourceDir()
    While (True)
        $file = FileFindNextFile($search)
        If @error Then
            ExitLoop
        EndIf
        $vidSourceFiles[$fileCount][0] = $file
        $vidSourceFiles[$fileCount][1] = $var
        GUICtrlSetData($vidSourceNum , "Files Found: " & $fileCount+1)
        GUICtrlSetData($vidSourceList , GUICtrlRead($vidSourceList) & @CRLF & " > Video File Found: " & $var & "\" & $file)
        $fileCount += 1
    WEnd
EndFunc

Func batchFFMPEGConverts()
;---ERROR CHK REQUIRED FIELDS B4 MOVING ON
    If GUICtrlRead($ffmpegExeLocation) = "" OR GUICtrlRead($ffmpegExeLocation) = "Set ffmpeg.exe Location" Then
        MsgBox(64, "User Error", "No FFMPEG.exe Set." & @LF & "Requested action will now terminate.")
        Return
    Else
        If NOT FileExists(GUICtrlRead($ffmpegExeLocation)) Then
            MsgBox(64, "User Error", "The FFMPEG.exe Location Does Not Exsist." & @LF & "Requested action will now terminate.")
            Return
        EndIf
    EndIf
    GUICtrlSetState($startVidExport, $GUI_DISABLE)
    GUICtrlSetState($startVidExport, $GUI_HIDE)
    GUICtrlSetState($proggy, $GUI_SHOW)
    Global $xmlFile
    Global $count = 100/$fileCount

    If NOT WinExists("C:\Windows\system32\cmd.exe") Then
        Run("C:\Windows\system32\cmd.exe", "", @SW_MAXIMIZE)
    EndIf
    WinActivate("C:\Windows\system32\cmd.exe")
    WinWaitActive("C:\Windows\system32\cmd.exe")
    ;create _converted directory
    DirCreate(GUICtrlRead($vidSourceDir) & "\_converted")

;---LOOP THROUGH VIDEO FILES AND SEND FFMPEG COMMAND TO CONVERT IT.
    FOR $i = 0 to UBound($vidSourceFiles)-1
        $file = $vidSourceFiles[$i][0]
        $source = $vidSourceFiles[$i][1]
        $xmlFile = $source & "\" & $file
        ;write out ffmpeg commandline here
        WinActivate("C:\Windows\system32\cmd.exe")
        WinWaitActive("C:\Windows\system32\cmd.exe")
        Send(GUICtrlRead($ffmpegExeLocation) & " -i """ & $xmlFile & """ " & GUICtrlRead($ffmpegCommand) & " """ & $source & "\_converted\" & StringTrimRight($file, 3) & GUICtrlRead($convertedFileType) & """{ENTER}")
        ;update progress bar
        If $count*($i+1) = 100 Then
            GUICtrlSetData($proggy, 99)
        Else
            GUICtrlSetData($proggy, ($count*($i+1)))
        EndIf
        WinWait("C:\Windows\system32\cmd.exe")
        ;change converted number.
        GUICtrlSetData($vidFilesConverted, "Files Converted: " & $i+1)
    NEXT
    GUICtrlSetData($proggy, 100)
    WinClose("C:\Windows\system32\cmd.exe")
    ;delete original video files
    If GUICtrlRead($deleteInput) = 1 Then
        $msg = MsgBox(65, "Delete Original Video Files", "'Delete original video files after convertion' has been selected. This will happen in 10 seconds. Click 'Cancel' to cancel file deletion. (Files will be moved to recycle bin, they can be restored from there untill you empty the recycle bin.)", 10)
        If $msg <> 2 Then
            FOR $i = 0 to UBound($vidSourceFiles)-1
                $vidFile = $vidSourceFiles[$i][1] & "\" & $vidSourceFiles[$i][0]
                ; if file exsist, delete it
                If FileExists($vidFile) Then
                    FileRecycle($vidFile)
                EndIf
                ;change deleted number.
                GUICtrlSetData($vidFilesDeleted, "Files Deleted: " & $i+1)
                GUICtrlSetData($proggy, (100-$count*($i+1)))
            NEXT
        EndIf
    EndIf
    ;shutdown/reboot
    If GUICtrlRead($o1) = 1 Then
        $msg = MsgBox(65, "Automated Reboot", "Computer will reboot in 10 seconds. Click 'Cancel' to cancel reboot.", 10)
        If $msg <> 2 Then
            Shutdown(6)
            Exit
        EndIf
    EndIf
    If GUICtrlRead($o2) = 1 Then
        $msg = MsgBox(65, "Automated Shutdown", "Computer will shutdown in 10 seconds. Click 'Cancel' to cancel shutdown.", 10)
        If $msg <> 2 Then
            Shutdown(5)
            Exit
        EndIf
    EndIf
    GUICtrlSetState($proggy, $GUI_HIDE)
    GUICtrlSetData($proggy, 0)
    GUICtrlSetState($startVidExport, $GUI_SHOW)
    GUICtrlSetState($startVidExport, $GUI_ENABLE)
 EndFunc


;------------------------------------------------ LOOP -------------------------------------------------------;
While 1
    $msg = GUIGetMsg(1)
    Select
        Case $msg[0] = $vidSetSourceDir
            vidSourceDir()
        Case $msg[0] = $startVidExport
            batchFFMPEGConverts()
        Case $msg[0] = $ffmpegBrowseBtn
            ffmpegExeLoc()
        Case $msg[0] = $GUI_EVENT_CLOSE
            Exit
    EndSelect
WEnd

Hopefully someone may find it usefull? Enjoy.


My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator

Share this post


Link to post
Share on other sites

Is it possible to capture the metadata of the mts file and transfer it to the new encoded mp4 file via this same script?

Share this post


Link to post
Share on other sites

@GODLYDEVILS this isn't an app, it is code that you would compile into an executable. If you do not have any experience in this, you might want to start more slowly - download AutoIt and install, and start learning how the language works.


"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By CYCho
      This file includes all the source codes and a compiled .exe version of zPlayer, which is a stand-alone, simple, intuitive and easy-to-use, yet fully functional media player.  I made this to suit my purpose and you can tweak it to your taste. The source code is only about 1300 lines and only standard #include files were used.
      zPlayer was my first AutoIt project through which I was hoping to learn coding. A media player capable of playing back audio and video files was my initial goal, but video was beyond my capacity for my lack of coding experience. So zPlayer was born as an audio-only player and remained so up to Version 2.0.1.5.
      Just recently I decided to add video function to zPlayer now that I had gained some experience. I thought it would be possible, but I didn't expect it to be this simple. I made minimal changes to the existing code and added only about 80 lines and, voila, I have an integrated audio and video player, starting from Version 3.0.0.1.
      This player has the following features:
      - Play back all formats of media files which can be palyed back by the Windows Media Player in your computer
      - Depending on the file types specified by the user in zPlayer.ini file this player can be either audio only, video only or both.
      - Video window is independent of other windows and, when it is maximized, increases the immersiveness of the user
      - Graphical player similar to embedded Windows Media Player
      - Forward, backward, pause, repeat, shuffle funtion
      - Increase/decrease/mute sound volume
      - Change folders and create playlist for all media files in that folder and its subfolders, and support for manually-made playlists
      - Save play-back environment when terminating and resume that environment when restarting
      - With one click, you can see internet search results for the file selected in playlist
      - With a double-click, you can play back an item in the playlist
      - Search strings in the playlist
      - Option to see long file names including folder names
      - Resize the playlist and video windows, and restore them to their default positions
      - Very small footprint: very low CPU and memory usage, with only about 1MB when compiled
      - You can even hide all the windows and manipulate the player with hotkeys only
      Note: zPlayer is the name I used when I introduced the early version of this palyer in my blog back in early 2009 and, therefore, has nothing to do with the mobile media player of the same name which started marketing in 2015.
    • By CYCho
      zPlayer is the name I used when I introduced the early version of this palyer in my blog back in early 2009 and, therefore, has nothing to do with the mobile media player of the same name which started marketing in 2015.
      After I retired from active duty in 2002 I spent much time listening to music. First I started with CD's and LP's, then quickly moved on to mp3 files. I converted many of my CD's to mp3 and I collected many more from various sources which were freely available at the time. As the number of my mp3 files grew, I put them in folders according to their genres and my favorite classifications. I mainly used Windows Media Player to listen to them and I slowly began to dislike wmp because it had massive user interface while I just wanted to listen to music in the background while I was doing other work in the foreground, hopping between folders from time to time. It was the time I was beginning to learn AutoIt and I thought I should make my own player with AutoIt. Coming from a sales career with no experience in programming, it was not an easy task. Somehow, after about 2 years of learning and trying, I had my own audio player which worked with only hotkeys without any graphical interface. I gave it to some of my friends who were not as computer-savvy as I. They liked it but definitely wanted something to clcik with mouse. So I came up with very rude gui which took a form similar to what it is now.
      The attached source files include one au3 file, one icon file and 14 jpg files. The jpg files are used for drawing a graphical player and are fileinstalled in @DocumentsCommonDir folder. This player uses WMPlayer.OCX as its engine and supports all audio file formats supported by wmp and additional codecs installed. I would like to thank @Bilgus for kind answers to my questions and would appreciate it if anyone could review the code and give me any suggestion. This player works for me, but I don't know whether the code is presentable as an example. I am posting this here with a hope to learn much from AutoIt community.
      PS: 1. An error (Variable used before declaration) was reported and corrected - 02:00 hours GMT,  March 14, 2019
            2. An error in tray menu was corrected -10:00 hours GMT, March14, 2019
            3. AutoIt3Wrapper_Au3Check_Parameters definition was added at the top of the code and all ensuing errors were corrected. - 00:10 hours GMT, March 16 2019
            4. Some features were added. - 10:30 hours GMT, March 18, 2019
                a. Jumping to new play-back position in a file
                b. Support for a manually made playlist
                c. Ctrl+Alt+h hotkey to trigger a help message box
            5. The minimum resizing width of playlist window was set at 450. - 01:10 hours GMT, March 23, 2019
            6. Problems associated with actions taken while in 'paused' status was addressed. - 07:40 GMT, April 12, 2019
            7. An error was found and corrected in restoring previous play-back environment when the mode was 'Shuffled.' - 11:00 GMT, April 17, 2019


      Please see Downloads section of this forum for source code files.
       
    • By abberration
      Hello, all!
      I found all the Mp3 encoders I have used to be tedious in that you have to encode your albums one at a time, you have to create output folders and select them. I wanted something where I can just dump a bunch of folders and select my Mp3 folder for the output. Nothing out there works like that, so I wrote my own script.
      By default, it creates the output folders from the metadata. If metadata isn't present, it uses the source material to create the folder and track names.
      It uses FFMpeg to do the actual encoding, but it was too large to include in the package, so it must be downloaded separately. When you open the program for the first time, you will see "FFMpeg Not Found!". Click that or the button to pull up a search Gui where it has links for you to download FFMpeg. Also, to keep file size down, I didn't include a compiled version (you guys know how to do that). The package includes an icon (if you want to use it), a user's guide, and a function flowchart (if you want to edit the script, this may help decipher it).

      Easy_Mp3.zip
    • By nacerbaaziz
      goodmorning; autoit team
      please their are any youtube search way working?
      because i was using the get source and split it to get the result but know it does not working any way.
      is the youtube disabled that? and is their any other simple way to do that?
      i tested all examples found in this post but also it don't work
      https://www.autoitscript.com/forum/topic/123945-youtube-search/
      and here is the example that i use to and it don't work any more
      local $hSearchOpenHNDL, $hSearchConnect, $sSearchGet local $a_UrlsArray[1][5] local $b_ButtonsDisabled = false, $b_SearchBTNFocus = false, $b_SearchListFocus, $h_SearchFocusHND local $Return = "0" local $s_OpenStringY = "/feed/trending" local $ChannelUrl = "", $channelName = "" if Not ($a_YoutubeSearchArray[0][0] = 0) then GUICtrlSetData($searchInp, $s_youtubeSearchLastSearch) $s_OpenStringY = "/results?search_query=" & StringReplace(GUICtrlRead($searchInp), " ", "+") $a_UrlsArray = $a_YoutubeSearchArray for $i = 1 to $a_UrlsArray[0][0] _GUICtrlListBox_AddString($SearchList, $a_UrlsArray[$i][0] & $a_UrlsArray[$i][2] & $a_UrlsArray[$i][3]) next _GUICtrlListBox_SetCurSel($SearchList, $I_youtubeSearchLastIndex-1) GUICtrlSetState($SearchList, $GUI_focus) else if Ping("youtube.com", 1000) > 1 then $hSearchOpenHNDL = _WinHttpOpen('') if not (@Error) then $hSearchConnect = _WinHttpConnect($hSearchOpenHNDL, "youtube.com") if Not (@Error) then $sSearchGet = _WinHttpSimpleRequest($hSearchConnect, "get", $s_OpenStringY) if not (@Error) then local $a_strings = _StringBetween($sSearchGet, '<a href="/watch', "<ul") local $title = "" local $url = "" local $length = "" local $result = "" GUICtrlSetData($SearchList, "") ReDim $a_UrlsArray[1][5] for $i = 0 to UBound($a_strings)-1 $url = _StringBetween($a_strings[$i], "?", '"') if @error then ContinueLoop $url = "https://www.youtube.com/watch?" & $url[0] $title = _StringBetween($a_strings[$i], 'dir="', '</a>') if @error then ContinueLoop $title = $title[0] $title = StringRegExpReplace($title, '(.*\"\>)', "") if StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}', 0) = 1 then $length = StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}', 2) elseIf StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}', 0) = 1 then $length = StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}', 2) else $length = "" endIf if IsArray($length) then $length = ": (" & $length[0] & ")" else $length = "" endIf $ChannelUrl = stringRegexpReplace($a_strings[$i], '(^.*?<a.*?\"(\/user|\/channel))+', "$2") $channelName = stringRegexpReplace($ChannelUrl, '(.*?\".*?>)(.*</a>)+', "$2") $ChannelUrl = stringRegexpReplace($ChannelUrl, '(\".*)+', "") $channelName = stringRegexpReplace($channelName, '(</a>.*)+', "") $result &= $title & @crlf & $url & @crlf ReDim $a_UrlsArray[UBound($a_UrlsArray)+1][5] $a_UrlsArray[UBound($a_UrlsArray)-1][0] = $title $a_UrlsArray[UBound($a_UrlsArray)-1][1] = $url $a_UrlsArray[UBound($a_UrlsArray)-1][2] = $length if not ($channelName = "") then $a_UrlsArray[UBound($a_UrlsArray)-1][3] = ", (" & $channelName & ")" if not ($channelUrl = "") then $a_UrlsArray[UBound($a_UrlsArray)-1][4] = "https://www.youtube.com" & $channelUrl $a_UrlsArray[0][0] = UBound($a_UrlsArray)-1 _GUICtrlListBox_AddString($SearchList, $a_UrlsArray[UBound($a_UrlsArray)-1][0] & $length & $a_UrlsArray[UBound($a_UrlsArray)-1][3]) next endIf endIf endIf endIf endIf  
      i hope any one can help me
      thanks in advance
    • By obiwanceleri
      Good evening! 
      I know this has been done to death in many programming languages and probably even in AutoIt. 
      But couldn't help myself and as a learning challenge I wrote "yet another converter" LOL
      I need your help to test it and show me "the error of my ways" but in a nutshell here's what it can do already (taken from my source file) :
      Converts all zip files recursively into a 7Zip file, with max compression REQUIRES AUTOIT Version 3.3.14.5 + Exact copy with attributes and folder structure + Extensive error checking, including files blocked by anti-virus (by file count) + Can stop process and restart later with the use of a log file + Can pause process (but in between compressing / extracting files) + Creates a .CSV file that can be used to check on compression ratios + Dynamic GUI that enables user to see console while 7zip is working + Gui can be stretched horizontally for long filenames + Up to 5 retries while transfering compressed files + Checks free space (at startup) to make sure you don't kill your OS LOL + Have converted 10,000+ files with no issues in file integrity. + Open to suggestions and program free to modify to your liking + Will eventually be fully modular and configurable (if there is interest for this) + Exit codes so you can have an idea where program went wrong (if it did) + Fully commented so users can tinker away. - Cannot save archive comments. - Not FULLY tested yet, do not use on .zip files that have no backups The program also has a very minimal GUI that can be stretched. Not a huge fan of million-button interfaces.
      I also assume some people running this program will have a 1024x768 monitor so the GUI is made accordingly.
      There is no way I am keeping this script for myself. If this is useful to anybody, feel free to use it and modify it. All I ask is you credit me (as I will credit those who contribute).
      Now here's the issues that are left to fix. Any help is greatly appreciated and I will add your name in the credits if you so wish.
      - For some reason while compression is under way, all my current explorer windows flicker; notably the cut-and-paste part. I can't seem to narrow it down. 
      - Also context menu is closed in explorer every time program compresses / extracts a new file
      - I've added support for retries if, for some reason, AutoIt can't move the converted file. This happened once after 5000-6000 conversions. Now that I've programmed the retries, the process is somewhat slower. It shouldn't affect speed though.  
      - After compressing 10,000+ files (Yes I have that many zip files! Think Mame) I've had a system meltdown. There's a leak somewhere. Am I supposed to close something and I'm not? I've added _IsPressed() lately so closing that .DLL is not the cause of this leak. 
      - Subtracting one array from another was a tricky thing to program (happens when user stops and restarts process), if you can think of a faster way I'm all in.
      Obviously if you find bugs or have suggestions, I'm all ears. 
      Changelog is included in the source file, including credits.
      PLEASE DON'T CONVERT ALL YOUR FILES YET. It's not fully tested (well I tested it but I need others to test too).
       
      Obiwanceleri
      Zip27z_102.au3
×
×
  • Create New...