|
Smartversion command line utilityAbout command line utilityThere are two executables for SmartVersion for Windows. There are copied to the same folder. SmartVS.exe is the Windows version, with Graphics User Interface Smv.exe is the console version. starting smv.exe without parameter display the usage information below: For Unix version (Linux, MacOSX), there is only command line utility. Here are the usage of the command line executable, and somes samples below.
Smartversion 3.00 (c) 2002-2013 G. Vollant - https://www.smartversion.com/ - 64 bits Usage: smv l [SvfFile] List content of a SvfFile (replace l by lv to get a wide list) smv cr [SvfFile] [List of file, directory or wilcard] Create a new SvfFile, create the first directory as reference with List smv crz [SvfFile] [zipfile] Create a new SvfFile, create the first directory as reference from zipfile smv cz [SvfFile] [List of file, directory or wilcard] Create a new SvfFile, create the first directory as compressed with List smv czz [SvfFile] [List of file, directory or wilcard] Create a new SvfFile, create the first directory as compressed from zipfile smv i [SvfFile] [-br base_directory] [List of file, directory or wilcard] Add a set of file as new version smv iz SvfFile zipfile [-br base_directory] [List of file, directory or wilcard] Add content of a zipfile as new version smv a [SvfFile] [-br base_directory] [List of file, dir or wilcard] -v #[-#2] Add a set of file in existing version smv d [SvfFile] [-br base_directory] [List of file or wilcard] -v #[-#2] Delete file into existing version, from version # to version #2 smv x [SvfFile] [-br base_directory] [List of file or wilcard] [-v #] [-o] Extract a version (number # version, or latest by default, -o overwrite all) smv xz SvfFile zipfile [-br base_directory] [List of file or wilcard] [-v #] Extract a version to zip (# version, or latest by default) smv t [SvfFile] [-br base_directory] [-v #] Test the base directory, (number # version, or first by default) smv av [SvfFile] [SvfFileToBeAppend] Append somes version from file SvfFileToBeAppend to file SvfFile. A version of SvfFileToBeAppend must match extactly the latest version of SvfFile for smv i,a,d,x,t, [-br base_directory] needed if the first version is reference SvfFile created using cz contain the first version compressed (like .zip) SvfFile created using cr contain only name, size and checksum of file of the first version. So when you use a SvfFile created with cr, you need specify a directory which contain files referenced in first version with -br Options for smv i,a before [List of file, dir, wilcard]: [-onlyexistlatest] (or -oel) use only file which exist on latest version [-onlyexistversion #] (or -oev #) use only file which exist on version # Options for smv cr,cz,i,a before [List of file, dir, wilcard]: [-r] to recurse into directories [-n #] where # is the version name [-c #] where # is the version comment [-nf #, -cf #, -nfu #, -cfu #] for reading name/comment from file # [-nf #, -cf #] for ansi text file, [-nfu #, -cfu #] for unicode file Options for smv m,cr,cz,i,a before [List of file, dir, wilcard]: [-compressratio #] : select the block compress ratio if # is between 1 (faster) and 9 (smaller) : uses zlib engine if # is between 41 (faster) and 49 (smaller) : uses lzma engine if # is between 51 (faster) and 59 (smaller) : uses mix zlib+lzma engine svf file with lzma are not compatible with smartversion 1 or 2 [-v1compatibility] (or -v1compat) for compatibile file with SmartVersion 1 [-blocksize #] : select the internal blocksize (8 to 8192, power of 2) [-nbhashbits #] : select the internal number of hash bits Options for smv x,t,m,cr,cz,i,a before [List of file, dir, wilcard]: [-tmpdir #] : select the directory used to write temporary file [-memtmpsize #] : select the maximum memory size (KB) for temporary data Alternative to [List of file, dir, wilcard] [-lf #, -lfu #] read file list from text file Example: smv cz archives.svf -r c:\directory\* create a new archives with files from c:\directory recursely smv i archives.svf -r c:\directory\* add new version on archives.svf with files from c:\directory recursely smv a archives.svf -r c:\directory\file*.txt -v 1-3 add file*.txt on existing version from 1 to 3 smv d archives.svf file*.txt -v 1-3 delete file*.txt on existing version from 1 to 3 smv d archives.svf * -v 2 fully delete existing version 2 smv x archives.svf *.doc -v 3 -o extract *.doc file from archives.svf version 3, overwrite all existing file smv i archives.svf -lf listfile.txt -nf namever.txt -cf commentv.txt create new version on archives.svf, by reading list list of files from listfile.txt, get name of version on namever.txt and comment on commentv.txt smv | more display help on several screen Sample of usageYou can create a MakePatch.bat smv cr %1.svf %2 -sha1smv i %1.svf %3 -rf %2 %3 -br . or, another variant of MakePatch.bat: set smvexec="C:\Program Files\SmartVersion\smv.exe"%smvexec% cr %1.svf %2 -sha1 %smvexec% i %1.svf %3 -rf %2 %3 -br . or, to uses xz-lzma internal compression (smaller but slower): set smvexec="C:\Program Files\SmartVersion\smv.exe"%smvexec% cr %1.svf %2 -sha1 %smvexec% i %1.svf %3 -rf %2 %3 -br . -compressratio 48 then call "MakePatch <smartversion_file_to_create> <first_version> <two_version>" to create a patch between two file in current directory. After, for extracting from the smartversion file and the first version, both in current directory smv x %1.svf -br . |
Copyright Gilles Vollant Software, 2013