Announcement

Collapse
No announcement yet.

NEW DVDFab Command Line examples and sample tasks

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    From DVDFab Staff NEW DVDFab Command Line examples and sample tasks

    Using DVDFab Commands in Batch Files

    This handy utility was prepared by Wilson Wang, the DVDFab Product Manager. It allows you to convert a group of video files in a single directory to another format with no further intervention after starting the batch file.

    The batch file attached below uses DVDFab Command Line arguments to convert all of the files in a Source directory or folder to a different format and will also skip a file if it is already in the output directory, putting the file's name in a list named ExistsFile.txt. To use it, follow the steps below:
    1. Open a new .txt file (or download the file attached to this post) If you download the completed file, skip this step and go to step 3
    2. Copy the commands below to the empty .txt file you made earlier and Save the file and change the suffix to .bat
    3. Whether you created or downloaded the .bat file, open and modify it to suit the needs of your task (destination directory, profile types, etc.) Save it.
    4. When all Source files are present, double click the .bat file to run it. Your converted files will appear in the Destination you specified.




    Contents of Batch file:

    set VIDEO=D:\DVDFab
    set DESTDIR=D:\MyVideo
    set DVDFab="C:\Program Files\DVDFab11\DVDFab64.exe"
    set FILETYPE=mkv
    set DESTTYPE=mp4
    set PROFILE=MP4
    set MODE=CONVERTER
    rem the following must be typed with no carriage returns!

    for /R %VIDEO% %%X in (*.%FILETYPE%) do (if not exist "%DESTDIR%\Video\%%~nx.%DESTTYPE% (%DVDFAB% /MODE "%MODE%" /DEST "%DESTDIR%" /Profile "%PROFILE%" /SILENT/CLOSE) else (echo "EXISTS %DESTDIR%\%%~nX.%DESTTYPE%" Source Video.%%x>>%DESTDIR%Video\ExistsFile.txt))

    Comments for the command line

    set VIDEO=D:\DVDFab

    //set the source video directory, the command will use the files in this directory as the Source files for the conversions

    set DESTDIR
    =D:\MyVideo
    // Set the output directory for the new converted file.

    set DVDFAB="C:\Program Files\DVDFab 11\DVDFab64.exe"
    //Set the DVDFab path where DVDFab is installed on your computer (note: Program Files x86 for the 32-bit version)

    set FILETYPE=MKV
    //Set the file type of the source video format you want to convert, this means the command will convert all the MKV files in source video directory to the new format

    set DESTTYPE=mp4
    //Set the new converted format

    set PROFILE=MP4
    //Set that which profile you want to convert to, e.g. MP4, MKV, MKV.H265

    set MODE=CONVERTER
    //Set that Video Converter module used to convert the files

    if not exist "%DESTDIR%\Video\%%~nX.%DESTTYPE%" (
    %DVDFAB% /MODE "%MODE%" /SRC "%%X" /DEST "%DESTDIR%" /Profile "%PROFILE%" /SILENT /CLOSE) else (echo "Exists %DESTDIR%\%%~nX.%DESTTYPE%" >>%DESTDIR%\Video\ExistsFile.txt

    //Convert the video to the new format if the output directory does not already contain the same file.

    Hope this is useful for you!
    Regards,
    Wilson
    Attached Files
    Supplying DVDFab Logs in the Forum ...........................User Manual PDF for DVDFab v11................................ Guide: Using Images in Posts
    Supplying DMS Logs to Developers................................Enlarger AI FAQ.....
Working...
X