CopyMik – freeware program for a complex copy, rename (inclusive transliteration), encrypt, decrypt, compress, decompress, backup, restore files and folders, сopying from the shadow volumes.
Unlike robocopy, xcopy, or rsync program CopyMik has rename, compression and encryption features, that
allows the use of several masks at the same time for each key.
The keys are separated for files and folders.
When checking the conditions of copying, compression, encryption and renaming, you can use regular expressions.
Keys and masks can be read from files. Nested references to file keys and masks are allowed.
This eliminates the use of scripts to copy. For example: copy the structure of folders and folders
under their suitable mask with the content.
CopyMik is useful for creating backup copies of files with repeating folder structure.
Allows you to exclude from the backup or rename in the case of the existence of files and folders.
Supports copy acsess rights to files and folders separately. When copying files you can change their encryption or decryption and compress or decompress them, optionally encrypted/compressed files can be renamed in the forward and reverse directions, it is also possible to translate the names of files and folders from 14 languages.
Available are 12 different encryption algorithms that enables consistent encryption of several different algorithms (compulsive encryption), and this in turn greatly hinders breaking and decryption.
CopyMik also Contains many other useful features.
CopyMik 2.28 Beta Build 9 (Freeware)
for Windows
rusmikleАТgmail.com Mikhail Tchervonenko or telegram
Terms of use of the CopyMik program: The author does not bear responsibility for the consequences of using the CopyMik program. The CopyMik program is under testing and may contain errors! Using CopyMik, you fully assume responsibility for the results of the CopyMik program.
I agree to the terms of use of the CopyMik program – Download zip file
md5: copymik.exe – BF05FD7DCA504899302BBD5483A719AB
copymik_v2_28_9_beta.zip – 1E6EE731937097537AAD0C4704990073
Program for get md5 of file hier
For the correct display of all characters of national alphabets that are applied in the names of files and folders, the CopyMik console output encoding is utf8. for proper display of texts with national symbols you have to use the appropriate font in the console or change the output encoding – key / CP
Help to the projectHelp information for CopyMik -> Telegram
copymik.exe SourceDir TargetDir [Keys]
SourceDir and TargetDir – can contain predefined variables: {DATE} – current date, {DATETIME} – the current date and time (format variable {DATETIME} you can change with this key /DTF), {YEAR} – year number, {MONTHNAME} – name of the month, {DAYNAME} – weekday name, {MONTHOFYEAR} – month number of the year, {WEEKOFYEAR} – week number of the year, {WEEK OF MONTH} – week number of the month, {DAYOFYEAR} – day number of the year, {DAYOFMONTH} – day number of the month, {DAYOFWEEK} – day number of the week, {HOUR} – hour, {MIN} – minutes, {SEC} – seconds, {MSEC} – millisecond
Now you can read the masks of files and folders from a text file (UTF-8 encoding). To do this, instead of a mask, enter ::PathAndFileName that contains the masks. Each mask must begin on a new line, space characters are taken into account. Masks files can contain links to other masks files.
[/KF KeyFile1[ KeyFile2[ ….]]] Text Files with keys in the UTF8 encoding. Each key begins a new line. If there are duplicate keys, the key of the last file counts. If there are duplicate keys of the key works of the last file. The file keys have a higher priority than the keys from the command line. If the string does not begin with symbol “/” it is assumed that this is the path to the source or target folder (the folder is always the order of 1st row => source, 2nd row => target folder). In the key file, you can use the links to the mask files. You can make comments by beginning with //. The text in the line after the comment characters is ignored by the program.
[/MF[ FileMask1[ FileMask2[ ….]]]] Mask for copied files (default *)
[/MD[ DirMask1[ DirMask2[ ….]]]] Mask for copied folders (default *)
[/TP] Passing all source folders to the full depth of the nest regardless of whether the copy condition for the current folder is fulfilled or not.
[/XCD [DirMask1[ DirMask2[ ….]]]] Do not copy folders with the specified mask (default mask *)
[/XCF [FileMask1[ FileMask2[ ….]]]] Do not copy files with the specified mask (default mask *)
[/XDMD DirMask1[ DirMask2[ ….]]] Do not check the mask folder (/MD) in a folder with the specified mask (will use a mask *)
[/XDMF DirMask1[ DirMask2[ ….]]] Do not check the mask file in the folder with the specified mask (will use a mask *)
[/XSD] Exclude the folders that are not copied when you copy/reset security attributes
[/XSF] Exclude the files that are not copied when you copy/reset security attributes
[/SEXF[ FileMask1[ FileMask2[ ….]]]] Skip files if they already exist. Check only files with the specified mask. (default mask *)
[/RF[ FileMask1[ FileMask2[ ….]]]] Rename the file if it already exists (ignored by /OF key). Rename only files with the specified mask (default mask *).
[/OF[ FileMask1[ FileMask2[ ….]]]] Overwrite existing files. Overwrite only files with the specified mask (default mask *).
[/SOLDF[ FileMask1[ FileMask2[ ….]]]] Do not overwrite files with a later modification date (overwrite only old files). Check only files with the specified mask. (default mask *). It is only used in conjunction with the key /OF
[/SNEWF[ FileMask1[ FileMask2[ ….]]]] Just copy the files to the new date of the change. Check only files with the specified mask. (default mask *). It used only in conjunction with the key /OF
[/SDTSF[ FileMask1[ FileMask2[ ….]]]] Skip the files with the same modification date and size. Check only files with the specified mask. By encryption and decryption is not checked and always overwritten. (default mask *). It used only in conjunction with the key /OF
[/TDELTA Seconds[ Seconds2]] Accuracy in seconds from the target file by comparing the date in the key /SDTSF. The accuracy can be with a minus sign, plus and unsigned. If a minus sign minus this accuracy from the date of the target file if a plus plus. If the sign is not specified, the accuracy and the pros and cons at the same time. Accuracy default 0 seconds.
[/ODT[ MaskTargetDir1[ MaskTargetDir2[ ….]]]] Copy only if the destination folder exists, all other folders are excluded from copying. (Default mask *)
IMPORTANT! If you rename the folders then the folder mask check occurs with the new name
[/NODT[ MaskTargetDir1[ MaskTargetDir2[ ….]]]] Copy only if the destination folder does not exist, all other folders are excluded from copying. (Default mask *)
IMPORTANT! If you rename the folders then the folder mask check occurs with the new name
[/OFT[ MaskTargetFile1[ MaskTargetFile2[ ….]]]] Copying is performed only if the target file exists. All other files will be skipped. It only makes sense in conjunction with the key /OF. (Default mask *)
IMPORTANT! If you rename a file, then the file mask check takes place with the new name
[/NOFT[ MaskTargetFile1[ MaskTargetFile2[ ….]]]] Copying is performed only if the target file does not exist. All other files will be skipped. (Default mask *)
IMPORTANT! If you rename a file, then the file mask check takes place with the new name
[/NODELT] Do not delete files and folders in the destination folder by copying errors (for example, by using /MIR key)
[/RFT [Mask]] Mask for renaming files (if there is a target file with the same name). (Only in conjunction with the /RF key). The default mask is “{FNAMEEXT} – Copy ({NR})” where {NR} is the copy number.
Can use predefined variables: {SP} – space symbol, {DATE} – current date, {DATETIME} – the current date and time, {YEAR} – year number, {MONTHNAME} – name of the month, {DAYNAME} – weekday name, {MONTHOFYEAR} – month number of the year, {WEEKOFYEAR} – week number of the year, {WEEK OF MONTH} – week number of the month, {DAYOFYEAR} – day number of the year, {DAYOFMONTH} – day number of the month, {DAYOFWEEK} – day number of the week, {HOUR} – hour, {MIN} – minutes, {SEC} – seconds, {MSEC} – millisecond, {FNAMEEXT} – file name and extension, {FNAME} – file name, {FEXT} – file extension, {FEEXT} – file extension without a point, {QUOTE} – double quotation mark, {EQUAL} – symbol =
[/CAF Attribute1[ Attribute2[….]] Include or exclude files with attributes from copying. Attributes that begin with a plus sign – allow copying of files and from a minus – forbid. The default sign is +. Priority in write order.
Possible attributes: R – read only, H – hidden, S – system, A – archive, D – file of windows device, F – normal file, T – temporary, G – low density file (usually containing many zeros), C – compressed, O – not attached (file content not available), N – not indexed, E – encrypted, V – Virtual
[/CAD Attribute1[ Attribute2[….]] Include or exclude folders with attributes from copying. Attributes that begin with a plus sign – allow copying folders a from minus – forbid. The default sign is +. Priority in write order.
Possible attributes: R – read only, H – hidden, S – system, A – archive, C – compressed, N – not indexed, E – encrypted, P – entry point (is a block of user-defined data associated with a real directory)
IMPORTANT! In recent versions of windows to copy or create entry points/links requires running copymik with administrator rights
[/GL] follow the link when copying a link/entry point (copy real data and not the link/entry point itself)
[/BDEL[ FolderForBackups]] Specifies the destination folder for the backup of the target files to be deleted (eg with /MIR key).
If the folder is not specified then the main target folder with the postfix _BDEL and the subfolder based on {DATETIME}
Before deleting, the file will be copied to the specified folder, the folder tree to the file will also be recreated.
Can use predefined variables: {SP} – space symbol, {DATE} – current date, {DATETIME} – the current date and time, {YEAR} – year number, {MONTHNAME} – name of the month, {DAYNAME} – weekday name, {MONTHOFYEAR} – month number of the year, {WEEKOFYEAR} – week number of the year, {WEEK OF MONTH} – week number of the month, {DAYOFYEAR} – day number of the year, {DAYOFMONTH} – day number of the month, {DAYOFWEEK} – day number of the week, {HOUR} – hour, {MIN} – minutes, {SEC} – seconds, {MSEC} – millisecond
ATTENTION! If the /BDEL and /MDEL and /EXMDEL keys are absent then the backup of the deleted files is not performed!
ATTENTION! The backup folder must not be the same as the target folder or any of the target subfolders.
ATTENTION! To back up the deleted target files with the default parameters, one of the keys /BDEL or /MDEL or /EXMDEL is sufficient.
ATTENTION! If there was an error during the backup process, copying the linked file and replacing/deleting the target file will not be performed!
[/MDEL[ FileMask1[ FileMask2[….]]]] Mask of the target files to be deleted for which you should make backup copies before deleting. (If the key is not specified and the default mask * is all).
ATTENTION! The mask should take into account the renaming of files, since the check is made by file names from the target folder!
ATTENTION! If the /BDEL and /MDEL and /EXMDEL keys are absent then the backup of the deleted files is not performed!
ATTENTION! To back up the deleted target files with the default parameters, one of the keys /BDEL or /MDEL or /EXMDEL is sufficient.
ATTENTION! If there was an error during the backup process, copying the linked file and replacing/deleting the target file will not be performed!
[/EXMDEL[ FileMask1[ FileMask2[….]]]] Mask of deleted target files for which you should NOT make backup copies before deleting. (The default mask is *.tmp).
ATTENTION! The mask should take into account the renaming of files, since the check is made by file names from the target folder!
ATTENTION! If the /BDEL and /MDEL and /EXMDEL keys are absent then the backup of the deleted files is not performed!
ATTENTION! To back up the deleted target files with the default parameters, one of the keys /BDEL or /MDEL or /EXMDEL is sufficient.
ATTENTION! If there was an error during the backup process, copying the linked file and replacing/deleting the target file will not be performed!
[/BREPL] Specifies the folder for the backup of the target files to be replaced (eg with /MIR or /OF …).
If the folder is not specified then the main target folder with the postfix _BREPL and the subfolder based on {DATETIME}
Before deleting, the file will be copied to the specified folder, the folder tree to the file will also be recreated.
Can use predefined variables: {SP} – space symbol, {DATE} – current date, {DATETIME} – the current date and time, {YEAR} – year number, {MONTHNAME} – name of the month, {DAYNAME} – weekday name, {MONTHOFYEAR} – month number of the year, {WEEKOFYEAR} – week number of the year, {WEEK OF MONTH} – week number of the month, {DAYOFYEAR} – day number of the year, {DAYOFMONTH} – day number of the month, {DAYOFWEEK} – day number of the week, {HOUR} – hour, {MIN} – minutes, {SEC} – seconds, {MSEC} – millisecond
ATTENTION! If the /BREPL and /MREPL keys are not present then the backup of the replaced files is not performed!
ATTENTION! The backup folder must not be the same as the target folder or any of the target subfolders.
ATTENTION! If there was an error during the backup process, copying the linked file and replacing/deleting the target file will not be performed!
[/MREPL[ FileMask1[ FileMask2[….]]]] Mask of the replaced target files for which you should make backup copies before replacing. (If the key is not specified and the default mask * is all).
ATTENTION! The mask should take the renaming of files into account, since the check is made by file names from the target folder!
ATTENTION! If the / BREPL and /MREPL and /EXMREPL keys are not present then the backup of the replaced files is not performed!
ATTENTION! To back up the replaced target files with the default parameters, one of the /BREPL or /MREPL or /EXMREPL keys is sufficient.
ATTENTION! If there was an error during the backup process, copying the linked file and replacing/deleting the target file will not be performed!
[/EXMREPL[ FileMask1[ FileMask2[….]]]] Mask of replaceable target files for which you should NOT make backup copies before deleting. (The default mask is *.tmp).
ATTENTION! The mask should take into account the renaming of files, since the check is made by file names from the target folder!
ATTENTION! If the /BREPL and /MREPL and /EXMREPL keys are not present then the backup of the replaced files is not performed!
ATTENTION! To back up the replaced target files with the default parameters, one of the keys /BREPL or /MREPL or /EXMREPL is sufficient
ATTENTION! If there was an error during the backup process, copying the linked file and replacing/deleting the target file will not be performed!
[/BEMPTY] Make a backup of the empty deleted folders. (Only in conjunction with the /BDEL and/or /MDEL and/or /EXMDEL keys)
[/DELF [FileMask1 [FileMask2 [….]]]] After a successful backup/compression/encryption to delete files in the source folder specified by the mask. (default mask * – All)
[/DELFD [DirMask1 [DirMask2 [….]]]] Limits the action key /DELF to source folders with specified masks. (default mask * – All)
IMPORTANT!!! keys /DELF and /DELFD work only for successfully copied/compressed/rename the file and do not work in combination with the keys /DNSF or /MIR
[/MD5[ FileMask1[ FileMask2[ ….]]]] Copy only files with checksum mismatch. Check only files with the specified mask. By encryption and decryption is not checked and always overwritten. (default mask *). It used only in conjunction with the key /OF. Watch Out !!! Checksum slows down the copy operation. In most cases, use the key /SDTSF in combination with a key /OF
[/SZF NSizeBytes] Copy/compress/encrypt only files larger than or equal to NSizeBytes bytes
[/SZT NSizeBytes] Copy/compress/encrypt only files of less than or equal NSizeBytes bytes
[/TM [Nsec]] Copy/compress/encrypt files only with the date and time of change within the last Nsec seconds (counting from the current time). Default Nsec = 3600 (one hour)
[/DT[ Ndays]] Copy/Compress/Encrypt only files with the date of last change within the last Ndays days (counting from the current date, time is discarded and does not count). By default Ndays=0 day (today)
[/DTS DD.MM.YYYY] Copy/Compress/Encrypt files only with the date of change greater than or equal DD.MM.YYYY date (eg. 01.09.2015) (where DD – day of the month, MM – month, YYYY – year. It is important – leading zeros are required!
[/DTE DD.MM.YYYY] Copy/Compress/Encrypt files only with the date change less than or equal DD.MM.YYYY date (eg. 01.09.2015) (where DD – day of the month, MM – month, YYYY – year. It is important – leading zeros are required!
[/DNSF[ FileMask1[ FileMask2[ ….]]]] Delete files if there is no source files. Delete only files with the specified mask. (default mask *)
[/DNSD[ DirMask1[ DirMask2[ ….]]]] Delete folders if there is no source folders. Delete only folders with the specified mask. (default mask *)
[/MIR] [ FileMask1[ FileMask2[ ….]]]] equivalent combination of keys: /MF [ FileMask1[ FileMask2[ ….]]]] /MD /CSF /OF [ FileMask1[ FileMask2[ ….]]]] /DNSF [ FileMask1[ FileMask2[ ….]]]] /DNSD (default mask *)
IMPORTANT!!! Renaming files can automatically disable the mirroring function (/MIR and the like). The exceptions are the keys to add or remove file extensions in compression, decompression, compression and decompression /COADD /DECODEL /CRADD /DECRDEL.
[/NCD] Do not create a folder tree (all files copied to TargetDir folder)
[/RFA[ FileMask1[ FileMask2[ ….]]]] Reset file attributes (set Archive). Only files with the specified mask. (default mask *)
[/RDA[ DirMask1[ DirMask2[ ….]]]] Reset folder attributes. Only folders with the specified mask. (default mask *)
[/AF [FileMask1=]FileAtributy1[ [FileMask2=]FileAtributy2[….]]] Set or clear attributes for files with the specified mask. Attributes beginning with a plus sign and a minus added are removed. Possible attributes R – Read only, A – Archive, S – System, H – Hidden, C – Compressed, N – Not indexed, O – Offline, E – Encrypted, T – Temporary. Key /AF has a lower priority than the key /RFA. Allowed truncated form – without a mask file and the equals sign, in this case, the mask will default *. For example /AF -H-S *.doc=+A *.tmp=-A
[/AD [DirMask=]Atributy1[[ DirMask2=]Atributy2[….]]] Set or reset the attributes for files matching the mask. Attributes beginning with a plus sign – add to a minus – are removed. Possible attributes R – Read only, A – Archive, S – System, H – Hidden, C – Compressed, N – Not indexed, O – Offline, E – Encrypted, T – Temporary. Key /AD has a lower priority than the key /RDA. Allowed truncated form – without a mask file and the equals sign, in this case, the mask will default *. For example /AD -H-S doc*=+A tmp=-A+H temp=-A+H
[/CTF[ FileMask1 [FileMask2 [….]]]] Copy the last record date of creation, last access and change files. Only files matching the mask. (Default mask * – All)
[/CTD[ DirMask1[ DirMask2[ ….]]]] Copy the last record date of creation, last access and change folders. Only folders matching the mask. (Default mask * – All)
[/CS[ FileMask1[ FileMask2[ ….]]]] Copy file und folder security attributes. Only files with the specified mask and folder mit mask *. The /CS key is equivalent to a key combination /CSF[ FileMask1[ FileMask2[ ….]]]] and /CSD *. (default mask *)
[/CSF[ FileMask1[ FileMask2[ ….]]]] Copy file security attributes. Only files with the specified mask. The /CSF key is equivalent to a key combination /CSFO, /CSFG, /CSFD, /CSFS. (default mask *)
[/CSFO[ FileMask1[ FileMask2[ ….]]]] – Copy the part of the security descriptor responsible for the owner of the file. (Default Mask *)
[/CSFG[ FileMask1[ FileMask2[ ….]]]] – Copy the part of the security descriptor responsible for the group policy file. (Default Mask *)
[/CSFD[ FileMask1[ FileMask2[ ….]]]] – Copy part of the security descriptor responsible for the selective access control list, controlled by the owner of the file and regulating the rights of users and groups to actions with the file (read, write, delete, etc.). (Default Mask *)
[/CSFS[ FileMask1[ FileMask2[ ….]]]] – Copy the part of the security descriptor responsible for the audit file. (Default Mask *)
[/CSD[ DirMask1[ DirMask2[ ….]]]] Copy folder security attributes. Only folders with the specified mask. The /CSD key is equivalent to the simultaneous combination of keys /CSDO, /CSDG, /CSDD, /CSDS. (default mask *)
[/CSDO[ DirMask1[ DirMask2[ ….]]]] – Copy the part of the security descriptor responsible for the owner of the folder. (Default Mask *)
[/CSDG[ DirMask1[ DirMask2[ ….]]]] – Copy the part of the security descriptor responsible for the group policy. (Default Mask *)
[/CSDD[ DirMask1[ DirMask2[ ….]]]] – Copy part of the security descriptor responsible for the selective access control list, controlled by the owner of the folder and regulating the rights of users and groups to actions with the folder (read, write, delete, etc.). (Default Mask *)
[/CSDS[ DirMask1[ DirMask2[ ….]]]] – Copy the part of the security descriptor responsible for the audit folder. (Default Mask *)
[/NOF[ FileMask1[ FileMask2[ ….]]]] Normalize (transliterated) filenames. Only files matching the mask. (default mask * – All)
[/NOD[ DirMask1[ DirMask2[ ….]]]] Normalize (transliterated) folder names. Only folders matching the mask. (default mask * – All)
[/LANG language] Priority language transliteration. (default RU) Possible values: RU-Russian, JBR-Hebrew, HY-Armenian, UK-Ukrainian, BE-Belarusian, EL-Greek, KA-Georgian, LT-Lithuanian, TG-Tajik, KK-Kazakh, DE- German, SP-Spanish, FR-French, IT-Italian
[/STRF SeekingLine1 = NewLine1 [SeekingLine2=NewLine2 [….]]] Replace strings in file names (instead of spaces to write {SP}). Default replacement are case sensitive (see key / ICF) in key / STRF can use predefined variables {DATE} – current date, {DATETIME} – the current date and time, {YEAR} – year number, {MONTHNAME} – name of the month, {DAYNAME} – weekday name, {MONTHOFYEAR} – month number of the year, {WEEKOFYEAR} – week number of the year, {WEEK OF MONTH} – week number of the month, {DAYOFYEAR} – day number of the year, {DAYOFMONTH} – day number of the month, {DAYOFWEEK} – day number of the week, {HOUR} – hour, {MIN} – minutes, {SEC} – seconds, {MSEC} – millisecond, {CRDATETIME} – date and time the file was created, {LADATETIME} – date and time of last access, {LWDATETIME} – date and time of last modification, {FSIZE} – file size, {FDOS} – dos filename, {FMD5} – file hash md5 (checksum, be careful! It slows down the process of copying), {NUMBER} – serial number of the file in the folder, {FNUMBER} serial number of the file when copying, {DNUMBER} – serial number of folders for copying, {FNAMEEXT} – file name and extension, {FNAME} – the name of the file, {FEXT} – file extension, {FEEXT} – file extension without a point, {QUOTE} – double quote, {EQUAL} – symbol =
{BEGIN..} – the first N characters from the full file name (including the extension). For example – the first 5 {BEGIN5}
{MIDDLE..-..} characters between .. to .. from the full file name (including extension). For example {MIDDLE2-4} characters between 2 and 4 (inclusive)
{END..} – last N characters from the full file name (including extension). For example – the last 3 {END3}
{MIN..} – the minimum length of the full file name (including the extension) at which the key is replaced {BEGIN..} {MIDDLE..-..} {END..}
{FBEGIN..} – the first N characters from the file name without the extension. For example – the first 5 {BEGIN5}
{FMIDDLE..-..} characters between .. to .. from the file name without extension. For example {MIDDLE2-4} characters between 2 and 4 (inclusive)
{FEND..} – last N characters from the file name without an extension. For example – the last 3 {END3}
{FMIN..} – the minimum length of the file name without an extension under which the key exchange {FBEGIN..} {FMIDDLE..- ..} {FEND..}
{EBEGIN..} – the first N characters from the file extension (including the dot). For example – the first 5 {BEGIN5}
{EMIDDLE..-..} characters between .. to . from the file extension (including the dot). For example {MIDDLE2-4} characters between 2 and 4 (inclusive)
{EEND..} – last N characters from the file extension (including the dot). For example – the last 3 {END3}
{EMIN..} – the minimum length of the file extension (including the dot) at which the key exchange is {EBEGIN ..} {EMIDDLE ..- ..} {EEND ..}
‘[/ICF] replace switches in the key / STRF on case insensitive
[/STRD SeekingLine1 = NewLine1 [SeekingLine2=NewLine2 [….]]] Replace the line in folder names (instead of spaces to write {SP}) Default replacement are case sensitive (see key / ICD in the key / STRD can use predefined variables {DATE} – current date, {DATETIME} – the current date and time, {YEAR} – year number, {MONTHNAME} – name of the month, {DAYNAME} – weekday name, {MONTHOFYEAR} – month number of the year, {WEEKOFYEAR} – week number of the year, {WEEK OF MONTH} – week number of the month, {DAYOFYEAR} – day number of the year, {DAYOFMONTH} – day number of the month, {DAYOFWEEK} – day number of the week, {HOUR} – hour, {MIN} – minutes, {SEC} – seconds, {MSEC} – millisecond, {DNUMBER} – serial number of folders for copying, {DNAME} – folder name, {QUOTE} – double quote, {EQUAL} – symbol =
{BEGIN..} – the first N characters from the full folder name. For example – the first 5 {BEGIN5}
{MIDDLE..-..} characters between .. to .. from the full folder name. For example {MIDDLE2-4} characters between 2 and 4 (inclusive)
{END..} – last N characters from the full file name (including extension). For example – the last 3 {END3}
{MIN..} – the minimum length of the full folder name at which the key is replaced {BEGIN..}{MIDDLE..-..}{END..}
[/ICD] replace switches in the key / STRD on case insensitive
[/DTF [Mask date]] mask the date and time to output (used in variables {DATETIME} {CRDATETIME} {LADATETIME} {LWDATETIME}). (default mask yyyymmddhhnnss)
Date mask can contain the following control characters:
y = Year of the last 2 digits, yy = year from the last 2 digits, yyyy = year 4-digit, m = number of the month without 0, mm = month number as 2 digits, mmm = Month using ShortDayNames (Jan), mmmm = month using LongDayNames (January), d = number without 0, dd = 2 as the number of digits, ddd = number using ShortDayNames (Sun), dddd = number using LongDayNames (Sunday), ddddd = number in ShortDateFormat, dddddd = number in LongDateFormat, c = Using ShortDateFormat + LongTimeFormat, h = hour without 0, hh = hour as a 2 digit, n = minutes without 0, nn = minutes as 2 digits, s = seconds without 0, ss = Seconds as 2 numbers, z = Milliseconds without 0, zzz = Milliseconds as 2 digits, t = Using ShortTimeFormat, tt = Using LongTimeFormat and any other permissible in file names and folder symbols.
IMPORTANT!!! By default, rename disables the mirroring function (/MIR and the like). The exceptions are the keys to add or remove file extensions in compression, decompression, compression and decompression /COADD /DECODEL /CRADD /DECRDEL. Using key /ALWAYS be returned mirroring functionality. If you use the /ALWAYS keep in mind that all of the renamed files are deleted in the target folder if they are not present in the original folder. In fact, in the target folder only the not renamed files will remain
[/COMP] The encryption compatibility mode with program versions is below 2.22 when using an external file as an encryption key. Important!!! Starting with the version 2.22, in order to improve the cryptographic strength, the processing of the external encryption key in the form of an external file has been changed. Files encrypted in the program version 2.21 and below should be decrypted with the /COMP key The changes occurred only when the encryption key was used as an external file. If you use only the password or password + key file, for compatibility with older versions of CopyMik (from 2.21 and below), the /COMP key is not required.
[/C223] Encryption and decryption compatibility mode with CopyMik version versions below 2.24 for keys /B /R /PASS /CRPASS /DECRPASS (where the password was entered in the command line)
[/CR[ FileMask1[ FileMask2[ ….]]]] Encrypt files with these masks (Within the limits of keys /MF,/MD,/XCD,/XCF,/XDMD,/XDMF). (default mask *)
[/CREX FileMask1[ FileMask2[ ….]]] Not encrypt files with these masks. (Within the constraints of the key /CR)’);
[/CRM Algorithm] Change encryption algorithm. (default DES *). Possible values: DES, BLOWFISH, CAST128, 3DES, ICE, THINICE, ICE2, RC2, RC4, RIJNDAEL, SERPENT, TEA, TWOFISH
[/CRADD[ Text]] When you encrypt a file name to add text (default .cmcrypt)
[/CRPASS Password] Password for encryption
[/CRPF KeyFileToEncrypt] key file to encrypt. The maximum size – 2Gb minus the password size (if a password is set). Perhaps the combination of the key file and password.
[/PASS password] – encryption and decryption password (replaces /CRPASS and /DECRPASS at the same time)
[/WPASS] – visible interactive input of the encryption and decryption password (replaces /CRPASS and /DECRPASS at the same time), the password symbols are displayed in the console
[/HPASS] – the hidden interactive input of the encryption and decryption password at the same time (replaces /CRPASS and /DECRPASS at the same time), the password symbols are replaced by *
IMPORTANT!!! If you did not use the password when encrypting, CopyMik uses the internal password. In this case, anyone who has CopyMik will be able to decrypt your files using an empty password.
[/DECR[ FileMask1[ FileMask2[ ….]]]] Decrypt files with this mask. (Within the limits of keys /MF,/MD,/XCD,/XCF,/XDMD,/XDMF) (default mask *)
[/DECREX FileMask1[ FileMask2[ ….]]] Not decrypt files with this mask. (Within the constraints of the key /DECR)
[/DECRM Algorithm] Change decryption algorithm. (default DES *). Possible values: DES, BLOWFISH, CAST128, 3DES, ICE, THINICE, ICE2, RC2, RC4, RIJNDAEL, SERPENT, TEA, TWOFISH
[/DECRDEL[ Текст]] By decryption remove from file name text (default .cmcrypt)
[/DECRPASS Password] Password for decryption
[/DECRPF KeyFileToDecrypt] key file to decrypt. The maximum size – 2Gb minus the password size (if a password is set). Perhaps the combination of the key file and password.
IMPORTANT!!! for encryption, CopyMik not introducing an encrypted file password and a sign of the encryption algorithm. If you incorrectly type your password, or choose different from that used in the encryption algorithm decryption error message will not be shown. Decoding pass through, it is clear that in this case the data will not correspond to those that have been encrypted. Storing the password and the encryption algorithm is entirely the responsibility of the user. The only way to verify the correctness of the decryption of files is using compression, if the password was incorrect, then when you uncompress the files, you will receive an error message “ERROR: …. By decompress file (data error) …”
[/CO[ FileMask1[ FileMask2[ ….]]]] Compress files with these masks (Within the limits of keys /MF,/MD,/XCD,/XCF,/XDMD,/XDMF). (default mask *). Not compatible with /DECO and /DECR Keys for matching file mascs.
[/COEX FileMask1[ FileMask2[ ….]]] Not compress files with these masks. (Within the constraints of the key /CO)
[/COADD[ Text]] When you compress a file name to add text (default .cmcomp)
[/DECO[ FileMask1[ FileMask2[ ….]]]] Deccompress files with this mask. (Within the limits of keys /MF,/MD,/XCD,/XCF,/XDMD,/XDMF) (default mask *). Not compatible with /CO and /CR Keys for matching file mascs.
[/DECOEX FileMask1[ FileMask2[ ….]]] Not deccompress files with this mask. (Within the constraints of the key /DECO)
[/DECODEL[ Text]] By decompress remove from file name text (default .cmcomp).
[/B Password] Backup with compress and encrypt (equivalent combination of keys: /CO /CR /COADD /CRADD /OF)
[/R Password] Restore with decrypt and decompress (equivalent combination of keys: /DECO /DECR /DECODEL /DECRDEL /OF)
[/USR] Show current user name
[/ERR] Show only errors
[/DSKIP] Do not show information about the created folders (in combination with the key /NSKIP will leave in the output only information about the copied files and errors)
[/NSKIP] Do not show information about missing files
[/NSTAT] Do not show statistics
[/ND] Do not display log
[/PRIORITY [name Priority]] Change the priority of the program. Name of priority can be set to SUPER_LOW (or LOW-), LOW, BELOW_NORMAL (or NORMAL-), NORMAL, ABOVE_NORMAL (or NORMAL+), HIGEST (or MAX). Default – NORMAL. Permitted a shortened form of the key [/PR [name Priority]]
[/TH[ MaximumNumberOfParallelStreams]] Maximum number of concurrent file processing threads (default is the number of processors minus 1. Min = 1 and Max = 100)’
[/STH] Display on the screen or in the log the number of active threads at the moment. For example: (3) – means – three streams are active at the moment. (If the number of threads = 0 means at the time of the message, the last thread has already completed)
[/CP CodePage] Code page number for the console output (default 65001 – UTF8). Possible values: 0 – ANSI, 1 – OEM, 2 – MAC, 3 – threads ANSI, 866 – OEM RUS, 65000 – UTF7, 65001 – UTF8 etc -1 (Minus) turns off the coding changes. Console font should allow display of this encoding!
[/LOG[ PathAndLogFile]] entry in the log file (UTF8 incl. Byte Order Mark – BOM) (the default CopyMik_{DATETIME}.log in the current folder). If the file already exists it will be overwritten. Record within the constraints of keys /ERR, /NSKIP and /NSTAT. In file name and path you can use predefined variables: {SP} – space character, {DATE} – date of the backup, {DATETIME} – date and time of the backup (see key /DTF), {YEAR} – year number, {MONTHNAME} – name of the month, {DAYNAME} – weekday name, {MONTHOFYEAR} – month number of the year, {WEEKOFYEAR} – week number of the year, {WEEK OF MONTH} – week number of the month, {DAYOFYEAR} – day number of the year, {DAYOFMONTH} – day number of the month, {DAYOFWEEK} – day number of the week, {HOUR} – hour, {MIN} – minutes, {SEC} – seconds, {MSEC} – millisecond, {QUOTE} – double quote, {EQUAL} – sign =
[/ADDLOG] to write the end of the log file if it already exists
[/LCSV [splitter]] to write the log file format delimited (as CSV). The default separator character – ; (you can use the variables {SP} – space character and {TAB} – tab). Columns: 1th – Status, 2th – Communication, 3th – Source file and/or folder, 4th – Trust file and/or folder
[/DCSV [splitter]] Displays the log on the screen in a delimited file format (such as CSV). The default separator character – ; (you can use the variables {SP} – space character and {TAB} – tab). Columns: 1th – Status, 2th – Communication, 3th – Source file and/or folder, 4th – Trust file and/or folder
/NOLOGTIME – do not display completion date and time of the current operation on the screen and in the log (for compatibility with old log)
[/ADM] Run with administrator privileges (if any).
[/VF[ FileMask1[ FileMask2[ ….]]]] Files after copy verification (by file mask). Not compatible with compression and encryption (ignored). IMPORTANT!!! Strongly slows down Copy process! Limited by the scope of key /VD (if specified). (default mask *)
[/VD[ DirMask1[ DirMask2[ ….]]]] Files after copy verification (by folder mask). Not compatible with compression and encryption (ignored). IMPORTANT!!! Strongly slows down Copy process! Limited by the scope of key /VF (if specified). (default mask *)
[/NVF FileMask1[ FileMask2[ ….]]] Do not verify files with these masks. Works within the keys /VF and/or /VD
[/NVD DirMask1[ DirMask2[ ….]]] Do not verify the folder with these masks. Works within the keys /VF and/or /VD
[/MVS NSizeInByte] Maximum file size for verification in bytes (default: -1 unlimited). Works within the keys /VF and/or /VD
[/NHP] Disable paged help (without pause). Automatically includes key /HELP
[/PAUSE] Pause after completion of the program
[/PAUSEBYERROR] Pause after completing the program only if an error occurred
[/SE] Stop at the first error
[/REPEAT [RepeatNambe]] The number of repetitions with the access error. By default 3 repeat. 0 – repeated endlessly. (if the key /SE or /TEST then repeats are not made)
[/WAIT [sec]] Pause between repetitions when the access error. Default 15 seconds
[/TEST] Test mode. The actual copying, compressing, encrypting and removal are not made. In the absence of a network connection to the target folder it is assumed that the target folder does not exist. (Repeat connection will not be made). In test mode, check the target folders and files is carried out to a limited extent. Error connection, sharing, set permissions, dates and attributes, lack of disk space will not be revealed.
[/BEEP] – make a sound when an error occurs or a warning
[/SBEEP] – make a sound when the program starts
[/EBEEP] – make a sound at the end of the program
[/WBEEP] – make a sound while waiting/repeat
[/SETEXITCODE] The use of the number of copied files (from 0 to N) and if the number of errors encountered an error with a minus sign (from -1 to -N) as the return code of the program. (Eg. For use in batch files).
[/EXEC command] For each successfully copied file to execute a program or batch file. You can use variables: {SRCFILE} – the source file, {DSTFILE} – destination file, {SRCDIR} – the source folder, {DSTDIR} – the destination folder, {SRC} – the original file and the path to it, {DST} – file and the destination folder, {DATE} – current date, {DATETIME} – the current date and time, {YEAR} – year number, {MONTHNAME} – name of the month, {DAYNAME} – weekday name, {MONTHOFYEAR} – month number of the year, {WEEKOFYEAR} – week number of the year, {WEEK OF MONTH} – week number of the month, {DAYOFYEAR} – day number of the year, {DAYOFMONTH} – day number of the month, {DAYOFWEEK} – day number of the week, {HOUR} – hour, {MIN} – minutes, {SEC} – seconds, {MSEC} – millisecond, {NUMBER} – serial number of the file in the folder, {QUOTE} – double quote, {FNUMBER} serial number of the file when copying, {NUMBER} – serial number of folders for copying, {SP} – space character (space characters, please replace with {SP}, date format specifies key /DTF)
[/EXECPARAM Options] Command-line options for program or batch file in /EXEC. You can use variables: {SRCFILE} – the source file, {DSTFILE} – destination file, {SRCDIR} – the source folder, {DSTDIR} – the destination folder, {SRC} – the original file and the path to it, {DST} – file and the destination folder, {DATE} – current date, {DATETIME} – the current date and time, {YEAR} – year number, {MONTHNAME} – name of the month, {DAYNAME} – weekday name, {MONTHOFYEAR} – month number of the year, {WEEKOFYEAR} – week number of the year, {WEEK OF MONTH} – week number of the month, {DAYOFYEAR} – day number of the year, {DAYOFMONTH} – day number of the month, {DAYOFWEEK} – day number of the week, {HOUR} – hour, {MIN} – minutes, {SEC} – seconds, {MSEC} – millisecond, {NUMBER} – serial number of the file in the folder, {QUOTE} – double quote, {FNUMBER} serial number of the file when copying, {NUMBER} – serial number of folders for copying, {SP} – space character (space characters, please replace with {SP}, date format specifies key /DTF)
[/ENDEXEC command] If the copying process did not have any errors then run a program or batch file. You can use variables: {SRCDIR} – the source folder, {DSTDIR} – destination folder, {LOG} – log file and the path to it, {LOGFILE} – log file, {LOGPATH} – path to the log file, {DATE} – current date, {DATETIME} – the current date and time, {YEAR} – year number, {MONTHNAME} – name of the month, {DAYNAME} – weekday name, {MONTHOFYEAR} – month number of the year, {WEEKOFYEAR} – week number of the year, {WEEK OF MONTH} – week number of the month, {DAYOFYEAR} – day number of the year, {DAYOFMONTH} – day number of the month, {DAYOFWEEK} – day number of the week, {HOUR} – hour, {MIN} – minutes, {SEC} – seconds, {MSEC} – millisecond, {QUOTE} – double quote, {FNUMBER} The number of files copied, {NUMBER} – number of passed folders, {SP} – space character (space characters, please replace with {SP}, format {DATETIME} specifies key /DTF)
[/ENDEXECPARAM options]] Parameters for launching in /ENDEXEC program or batch file. You can use variables: {SRCDIR} – the source folder, {DSTDIR} – destination folder, {LOG} – log file and the path to it, {LOGFILE} – log file, {LOGPATH} – path to the log file, {DATE} – current date, {DATETIME} – the current date and time, {YEAR} – year number, {MONTHNAME} – name of the month, {DAYNAME} – weekday name, {MONTHOFYEAR} – month number of the year, {WEEKOFYEAR} – week number of the year, {WEEK OF MONTH} – week number of the month, {DAYOFYEAR} – day number of the year, {DAYOFMONTH} – day number of the month, {DAYOFWEEK} – day number of the week, {HOUR} – hour, {MIN} – minutes, {SEC} – seconds, {MSEC} – millisecond, {QUOTE} – double quote, {FNUMBER} The number of files copied, {NUMBER} – number of passed folders, {SP} – space character (space characters, please replace with {SP}, format {DATETIME} specifies key /DTF)
[/ENDERREXEC command] If the copying process there is at least one error is to run a program or batch file. You can use variables: {SRCDIR} – the source folder, {DSTDIR} – destination folder, {LOG} – log file and the path to it, {LOGFILE} – log file, {LOGPATH} – path to the log file, {DATE} – current date, {DATETIME} – the current date and time, {YEAR} – year number, {MONTHNAME} – name of the month, {DAYNAME} – weekday name, {MONTHOFYEAR} – month number of the year, {WEEKOFYEAR} – week number of the year, {WEEK OF MONTH} – week number of the month, {DAYOFYEAR} – day number of the year, {DAYOFMONTH} – day number of the month, {DAYOFWEEK} – day number of the week, {HOUR} – hour, {MIN} – minutes, {SEC} – seconds, {MSEC} – millisecond, {QUOTE} – double quote, {FNUMBER} The number of files copied, {NUMBER} – number of passed folders, {SP} – space character (space characters, please replace with {SP}, format {DATETIME} specifies key /DTF), {ERRORS} – errors
[/ENDERREXECPARAM options]] Parameters for launching in /ENDERREXEC program or batch file. You can use variables: {SRCDIR} – the source folder, {DSTDIR} – destination folder, {LOG} – log file and the path to it, {LOGFILE} – log file, {LOGPATH} – path to the log file, {DATE} – current date, {DATETIME} – the current date and time, {YEAR} – year number, {MONTHNAME} – name of the month, {DAYNAME} – weekday name, {MONTHOFYEAR} – month number of the year, {WEEKOFYEAR} – week number of the year, {WEEK OF MONTH} – week number of the month, {DAYOFYEAR} – day number of the year, {DAYOFMONTH} – day number of the month, {DAYOFWEEK} – day number of the week, {HOUR} – hour, {MIN} – minutes, {SEC} – seconds, {MSEC} – millisecond, {QUOTE} – double quote, {FNUMBER} The number of files copied, {NUMBER} – number of passed folders, {SP} – space character (space characters, please replace with {SP}, format {DATETIME} specifies key /DTF), {ERRORS} – errors
IMPORTANT!!! the results of key /ENDEXEC and /ENDERREXEC are not recorded in the log file (see key /LOG), concluded only on the display. At the time of implementation of these keys log file is closed and is accessible for manipulation.
Example 1:
copymik.exe c:\Documents d:\DocArchiv /MIR
Explanation:
Make a mirror copy of the Documents folder in the folder DocArchiv.
Example 2:
copymik.exe c:\Documents d:\DocArchiv /MD buch* progr* important* /MF *.txt *.cpp *.jpg *.bmp /XCD .svn tmp* /XCF *.tmp *.db /OF
Explanation:
Copy all files with masks *.txt *.cpp *.jpg *.bmp from folders with masks buch* progr* important*
Do not copy folders with masks .svn tmp*.
Do not copy files with the masks *.tmp *.db Overwrite existing files
Example 3:
copymik.exe c:\Documents d:\DocArchiv /MD buch* progr* important* /MF *.txt *.cpp *.jpg *.bmp /XDMD important* /XDMF important* /OF
Explanation:
Copy all files with masks *.txt *.cpp *.jpg *.bmp from folders with masks buch* progr* important*
Folders with mask important* copy completely.
Overwrite existing files
Example 4:
copymik.exe c:\Documents d:\DocArchiv
Explanation:
Copy all files with masks * from folders with masks c:\Documents in d:\DocArchiv
Skip existing files (For Overwrite use key /OF)
Example 5:
copymik D:\Documents\ c:\EncryptByckup /MF *.txt *.doc *.rtf *.bin /CR /CRADD /CREX *.bin /CRPASS tralala /OF
Explanation:
Copy all files with masks *.txt *.doc *.rtf *.bin from folder Documents in folder EncryptByckup. All files with mask *.txt *.doc *.rtf by copy encrypt und rename (add “.cmcrypt” text). Files with mask *.bin only copy and not encrypt.If the files in the destination folder already exists, they are overwritten. Password for encryption “tralala”, default algorithm DES.
Example 6:
copymik D:\Documents c:\EncryptByckup /MIR /CR /CRADD /CRPASS tralala
Explanation:
Mirror the folder Documents in folder EncryptByckup. All files encrypt and rename (add text “.cmcrypt”). Password for encryption “tralala”, default algorithm DES. If the files in the source folder do not exist, but in the target folder, they are deleted.
Example 7:
copymik D:\EncryptByckup c:\Documents /MIR /DECR /DECRDEL /DECRPASS tralala
Explanation:
Mirror the folder EncryptByckup in folder Documents. All files decrypt und rename (remove text “.cmcrypt”). Password for decryption “tralala”, default algorithm DES. If the files in the source folder do not exist, but in the target folder, they are deleted.
Example 8:
copymik D:\EncryptByckup c:\Documents /B mypass
Explanation:
Backup the folder EncryptByckup in folder Documents. All files compress and encrypt and rename (add text “.cmcomp.cmcrypt”). Password for encryption “mypass”.
Example 9:
copymik D:\EncryptByckup c:\Documents /B mypass /DT 1
Explanation:
In contrast to Example 8 to compress and encrypt files only with the date change yesterday and today (minus 1 day). Encryption password “mypass”.
Example 10:
copymik c:\Documents D:\EncryptByckup /R mypass
Explanation:
Restores (decrypts, decompresses and copies) files from the Documents folder to a folder EncryptByckup. The password for decryption “mypass”.
Example 11:
copymik c:\Documents d:\Documents /NOF /NOD
Explanation:
Copy the files from c:\Documents folder to the d:\Documents. When copying transliterate the names of files and folders.
Example 12:
copymik c:\Documents d:\Documents /STRD text{SP}22=folder{SP}55 /STRF {FEXT}=.abr
Explanation:
Copy the files from c:\Documents folder to the d:\Documents. When copying replace the text in the names of folders from “text 22” to “folder 55” and in the file name extension to “.abr”.
Example 13:
copymik c:\Documents d:\Documents /MF *.doc /OF /CO /CR /CRPASS mypass /EXEC sendmail.bat /EXECPARAM {QUOTE}{DST}{QUOTE}
Explanation:
Сompresses, encrypts and copies files with extension doc (if the file exists then overwrites) from folder c:\Documents folder in the d:\Documents. Upon successful copying starts sendmail.bat passing it as a parameter to the path and name of the destination file enclosing them in quotation marks.
Example 14:
copymik c:\Documents d:\Archiv /MF *.doc /OF /LOG c:\Logs\BackupDoc\DocCopyLog_{DATETIME}.csv /LCSV {TAB} /ND /ENDERREXEC SendLogPerEmailToAdmin.bat /ENDERREXECPARAM {LOG} /ENDEXEC CopyToArchiv.bat /ENDEXECPARAM {LOG}
Explanation:
Сopies files with the doc (if the file exists then overwrites) from folder c:\Documents folder to d:\Archiv. The process is documented in a log file in the CSV format with dividers – tab. Name the log file – DocCopyLog_DateAndTimeOfCopy.csv. Displays information on the screen is turned off. If an error occurs in a batch file SendLogPerEmailToAdmin.bat is passed to the log file (eg to send the log admin by e-mail). If no error occurred in the command file CopyToArchiv.bat is passed to the log file (for example, to move to the archive)
Example 15:
copymik c:\Documents d:\Archiv /DELF *.tmp /DELFD *LOG*
Explanation:
Copy all files from the folder c:\Documents folder to d:\Archiv. And files with mask *.tmp in the folder with a mask *LOG* moves.
Example 16:
copymik c:\Documents d:\Archiv /MF *.doc /OF /SDTSF
Explanation:
Copies all doc files from folder c:\Documents folder to d:\Archiv. Overwritten only differ in size or date of the files.
Example 17:
copymik.exe c:\source d:\dist /PRIORITY LOW-
Explanation:
Copy files with minimal priority of copymik (background, without loading the system resources)
Example 18:
Automatically send error log (or any other modified file) on administrator E-Mail
Instructions:
1. Create a batch file CheckErrorLog.cmd as follows:
REM Move the error log file (*.elf) to the archive previously renamed (inserting the name of the date and time of move),
REM if the movement had run a batch file EmailByError.bat passing it as a parameter link to a moved file
\\Server\ELF\copymik.exe \\Server\ProgramFolder \\Server\ELF\ALT /MF *.elf /NSKIP /XCD * /OF /SDTSF /DELF *.elf /STRF {FEXT}=.{DATETIME}{FEXT} /EXEC \\Server\ELF\EmailByError.bat /EXECPARAM {QUOTE}{DST}{QUOTE}{SP}{QUOTE}{SRC}{QUOTE}
2. Create a batch file EmailByError.bat, to send log on E-Mail Administrator, as follows (correct E-Mail sender and the receiver, the E-Mail caption, IP of SMTP Server and send log file):
rem Send E-Mail
\\Server\ELF\blat.exe %1 ^
-to administrator@domain.ru,Vasiliy Pupkin ^
-debug -timestamp -log blatSMTPlog.txt ^
-s “Error in program, log file – %1” ^
-i sender@domain.ru ^
-f “sender@domain.ru” ^
-q -server 192.168.1.22
3. Next, create periodically crown that periodically launches CheckErrorLog.cmd to perform. As soon as the error log file will appear in the program folder, it will be sent to Your E-Mail. To send E-Mail author uses freely distributed program blat
Example 19:
copymik C:\backup\20160302103207\ C:\Documents\ /R mypassword /MF contract154.doc.cmcomp.cmcrypt /XCD
Explanation:
Restore a single file from backup – contract154.doc. Do not restore the folder tree.
Example 20:
Using copymik program return code in a batch file:
REM **********************
REM Backup file backup.bat
REM **********************
cls
@echo off
set /P pass=”Password: “
if %pass% EQU “” exit /b 1
rem Backup C:\Documents\ in C:\Backup\{DATETIME}\ all files modified today
copymik C:\Documents\ C:\Backup\{DATETIME}\ /LOG c:\backup_{DATETIME}.log /SETEXITCODE /B %pass% /DT
if %ERRORLEVEL% EQU 0 goto :NOTCOPIED
if %ERRORLEVEL% GTR 0 goto :COPIED
if %ERRORLEVEL% LSS 0 goto :ERRCOPY
goto :EOF
:COPIED
REM %ERRORLEVEL% files copied
move c:\backup_*.log c:\Archiv\
goto :EOF
:ERRCOPY
REM %ERRORLEVEL% errors by copy
move c:\backup_*.log c:\Error\
goto :EOF
:NOTCOPIED
REM %ERRORLEVEL% = 0, files not copied
move c:\backup_*.log c:\Temp\
goto :EOF
REM **********************
REM End file backup.bat
REM **********************
Example 21:
copymik c:\Documents c:\backup /REPF 2 3 _{DATETIME}_
Copy files and folders from c: \ Documents in the c: \ backup replacing the file names from the 2nd to the 3rd inclusive character of the current date framed by underscores.
Example 22: Create Shadow Snapshot of volume “C:” and start bat file with link to Shadow Snapshot for copy from
VsToolkit.exe -exec=test.bat c:
In bat file:
copymik.exe %1\SourceFolder d:\DistFolder /CMF ….
More to example 22:
Starting with version 2.14 Copymik compatible with the shadow copies of volumes (VSS).
Shadow Copy (VSS) – Microsoft technology (c) built into the Windows (c) starting c Vista (c) allows to copy, open when copying to edit files. Services VSS do snapshot file system volume (only changed blocks at the moment) and provides access to the snapshot volume shadow on a special link. Further, this link can be used as a normal path to the desired file system. Now copies of it will not lead to sharing error. Important is that the technology only works at the level of the file system volume. You can not create a snapshot of that particular folder, only the entire volume. So think of a link to a shadow copy of a volume name ( for example, C: drive link may look like \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1 ). Get list of active snapshot volumes can command “vssadmin List Shadows”. Accordingly, the shadow copy of the folder c:\Documents will look like copymik.exe \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Documents D:\Backup In most cases, it copymik itself determines that copying is carried out from the shadow copy volume and turn on compatibility mode copying. If it does not automatically have the key /CMF including this mode. To initiate the creation of the shadow copy can be a means of most Windows (c) and special tools to run this process in the system. I am using for this purpose a free utility VsToolkit.exe (embedded Archived from copymik). Its user friendliness is not only in the fact that it will initiate the process of creating the volume shadow copy but also in that it can pass a link to a new shadow copy to other applications (eg. in a bat file), transmission always occurs first parametrnom. For example the following command initiates the creation of the shadow copy volume “C:” and passes a reference to it in the bat file running it to perform “VsToolkit.exe -exec=test.bat c:” The bat file itself is enough to insert a commando type “copymik.exe %1\SourceFolder d:\DistFolder /CMF ….” (key /CMF probably will not need). Please note that the maximum number of shadow copy volumes in the system 64 (manipulating the registry this number can be changed). If this number peaked Meto or under the shadow copies will loop process is ended and the first shadow copy is overwritten. In the operating system settings, you can set the volume for the shadow copies. To increase productivity of creating shadow copies and a copy of which it is desirable to place them on another physical disk. Time shadow copy creation depends on the performance and loading file system and the number of open files to change, (I have a volume of 1 terabyte process takes an average of 30-40 seconds, you have the time may vary).
Example 23:
copymik c:\Documents c:\backup /B /CAD -P /CAF -S /BREPL /EXMREPL *.bak.cmcomp.cmcrypt *.tmp.cmcomp.cmcrypt
Archives files and folders from c:\Documents to c:\backup. From the archive, folders with the artibut are excluded – the entry point and files with the system attribute. If files with the same name already exist in the destination folder, they are copied to the folder c:\Documents_BDEL\{DATETIME} before replacing them. Files with the extension .bak.cmcomp.cmcrypt and .tmp.cmcomp.cmcrypt are overwritten without copying them to the folder c:\Documents_BDEL\{DATETIME}
Example 24:
Copymik c:\Documents d:\Backup /STRF {FNAME}={FBEGIN3}~{FMIDDLE4-5}~{END2}{MIN9} {FEXT}={EBEGIN1}~{EMIDDLE3-3}~{EEND1}{EMIN4}
for all files with a length of more than 8 characters (without an extension) forms a new file name consisting of the first 3 symbols plus the symbol ~ plus symbols from 4 to 5 plus the symbol ~ plus 2a of the last character. If the file extension (including the dot) is longer than 3 characters, it forms a new file extension consisting of the first 1 character plus the character ~ plus the 3 character plus the character ~ plus 1 the last character. Fail with the name 123456789123456789.123456789 will receive the name 123~45~89.1~3~9
Example 25:
Copymik c:\Documents d:\Backup /STRD {DNAME}={BEGIN3}~{MIDDLE4-6}~{END3}{MIN9}
for all folders with a length of more than 8 characters,the command forms a new folder, the name consisting of the first 3 symbols plus the symbol ~ plus symbols from 4 to 6 plus the symbol ~ plus 3 of the last character. The folder named 123456789123456789 will receive the name 123~456~789
Example 26:
copymik c:\Users d:\Backup /MF FilesNotExists /XDMD c:\Users\*\Desktop c:\Users\*\Documents /XDMF c:\Users\*\Desktop c:\Users\*\Documents /OF /XCD “{R=^C:\\USERS\\[^\\]+\\(?!(DESKTOP|DOCUMENTS)(\\|$))}”
CopyMik copies user profiles with the Desktop and Documents folders to the d:\Backup folder, the other folders in the user profiles will be skipped
Example 27:
copymik c:\Users f:\Backup\Users /OF /TP /MD “{R=^C:\\USERS\\[^\\]+\\((DESKTOP|DOCUMENTS)(\\|$))}” /XCF “{R=^C:\\(USERS)\\(\w|[-.])+$}” /MF *.txt *.doc *.xls
Copy/overwrite files txt, doc and xls (key /MF …) from the Desktop and Documents folders in f:\Backup\Users located in user profiles C:\Users\ ….\…. The folder tree before files will also be created. Files in the original root folder of C:\Users are excluded from copying (key /XCF …).