HomeContact

 Site français Visitez mes pages en Français

     How to automate DVdate with a script

    or execute it in command-line mode


 

Download DVdate:
 DVdate


Help pages about DVdate: 

Install and launch
Information
Menu Display
Menu Video
Menu Rename
Menu Convert
Menu Inlay
Menu Scenes
Edit Scenes
Settings
Scripts

 



 This page is better viewed in 1024x768.

 

Last update

on Tuesday, April 22, 2008

 


     

. Open a script

. The syntax of scripts

. How to use it in command-line  mode

.Samples of scripts

    . Open a script

     

    DVdate  features a kind of script language, very simple, to help automate some commands. It's useful if they are to be applied to a great number of files either once, or a great number of times. The script commands are written in a text file (use for example notepad.exe delivered with Windows, at least if you do not use special characters like accents in your filenames).

 

    If you have such a script file on a drive, then the button or the shortcut Shift+CTRL+L will open the text file and launch the commands contained in the script. Caution, the script is immediately opened and launched, without any further confirmation.

     

    If the started script was not OK for you, you could abort it with the key Escape.

    back to topanigray07_up.gif


    . The syntax of scripts

    A script for DVdate  is a list of commands, each one having the following syntax:

     

    • a start sign among the three characters  + / -
    • a token for the command
    • for some commands, a parameter always starting with the sign = followed by a text, eventually in double quotes (it is compulsory only if the text contains blank spaces).

     

    The list of all commands is displayed when you type F11. For each commands, there are two forms of tokens: a short form called switch and a longer form, called script. The longer form is recommended in order to make clearer scripts. But in some cases, like command-line execution, the short form is also convenient.

     

  

 

    Examples of such commands are:

      +openfiles="C:\Documents and Settings\Paul Glagla\Bureau\j*.avi" opens all avi files starting with j and located on my desktop

      +1 converts all selected files that are DV of type1 to DV of type 2

      +$ creates a scn file from the content for all selected avi files

       

    The command +selectwhenopen is generally put before + openfiles when the files to open must be selected for a further processing. Sometimes, you will also put +emptylist, to be sure that some previous loaded files will not remain in the playlist of DVdate.

     

    The commands must be separated by blank spaces, or by the end of line in the script. That's why it is important to place the parameters containing blank spaces in double quotes. Several commands can be on the same line of the script, as long as each one starts with a start sign, and two commands are separated by blank spaces.

     

    If some text does not respect this syntax, it will be ignored. It is thus easy to write comments in the script by omitting the leading start sign before each word of the comment.

 

 


    . How to use it in command-line mode

     

    One can launch DVdate  in command line mode, by creating a file *.bat with the same syntax, except that the file must start with the path and filename of  DVdate. Caution, the command interpreter cmd needs to interpret some special characters (specially with accents) in DOS-ASCII instead of the ANSI provided by Windows. For that reason, notepad.exe  is not always well adapted to write bat files. It's better to use wordpad.exe or even Ms Word and save the file as a DOS text. If no special character is used, notepad  is  indeed OK.

     

    After the path and filename of DVdate, add some commands exactly written like script commands, but usually you will prefer the short form of tokens.

     

    For example to create a scn from content for each file on the root of the drive d:\, write the command line:

      c:\dvdate\dvdate_64fr.exe +so +o="d:\*.avi" +$

    where the file DVdate  is supposed to be in the folder c:\dvdate.

     

    Be aware that the command +openfiles="*.*" cannot open files in a sub-folder. To open all files from a folder and all its subfolders, use +openfolder=.

     

    You can use the command +openscript= in a script and thus launch an entire script from another script.

    back to topanigray07_up.gif


    . Samples of scripts

     

    Example1: suppose that we have avi DV files in the folder c:\my documents\my videos\ test and all videos have to be renamed à la Scenalyser, ie with the pattern holidays_20030629_16.50.12.avi. Verify first with F10 tab Formats that the settings are fine in DVDate: first the template used for renaming should be holidays_%D.avi and the format to rename should be yyyymmdd_hh.nn.ss. Then launch the following script:

     

    +emptylist

    +selectwhenopen

    +openfiles="c:\my documents\my videos\test\*.avi"

    +rename

  

    Example 2: suppose that we have avi divx files with codec DX50 or DIVX in the folder c:\my documents\my divx\ and we want all of their codecs to be XVID. The following script will do it.

     

    +emptylist

    +selectwhenopen

    +openfiles="c:\my documents\my divx\*.avi"

    +codec=XVID

       

     

    Example3:  suppose we have avi DV files in the folder c:\my documents\my videos\ and in a sub-folder called something. We want to inlay the date of capture in each of them, and delete the original file after that. DVdate  must close at the end of the script.

     

    +el

    +so

    +o="c:\my documents\mes videos\*.avi"

    +o="c:\mes documents\mes videos\something\*.avi"

    +i

    +delete

    +quit

     

    In the scripts above, you can include comments without effect on the script, as long as no word starts with one of the start signs. Comments help the future maintenance of the script file.

 

   

 

Settings of DVdate pink05_back.gif  pink05_next.gif Download DVdate