CryCopy: Command line flags
CryCopy with no arguments will generate the following summary help information showing each of the command line flags it can take:
C:\>crycopy
CryCopy version 2020.2.15.39794
Usage: CryCopy [source] [destination] [flags]
where:
[source] is the source folder
[destination] is the destinaton folder
flags:
/help show this help information
/continue Continue after errors (if possible).
/delete delete files at the destination that are not at the source
/er:error-log-file Log file to append errors to
/threads:n Use 'n' threads, default 1
/l:log-file Log file to append to
/newer do not overwrite newer files with older ones
/ifdifferent copy only if contents changed (slower!)
/output:none Silent. No console output.
/output:summary Display file counts. (default)
/output:files Display files being copied.
/output:verbose Display all file actions.
/quiet don't show any information messages
/u:username Username for ftp connections
/p:password Password for ftp connections
/readonly Overwrite readonly files
/subs copy sub-directories
+filespec Copy only matching files from source
-filespec Ignore matching files on source.
-filespec\ Ignore matching folders on source.
-R:filespec Ignore matching files (regex).
-R:filespec\ Ignore matching folders (regex).
#filespec Ignore matching files on source and destination.
#filespec\ Ignore matching folders on source and destination.
#R:filespec Ignore matching files on source and destinations (regex).
#R:filespec\ Ignore matching folders on source and destination (regex).
!filespec Always delete matching files at destination (not recommended)
^filespec Move matching files (delete at source after copy).
Use these flags to indicate if following flags should apply to the source or destination:
/source following flags apply to the source
/destination following flags apply to the destination
These flags apply to source or destination:
/zip zip (or unzip if source) each file instead of a copy
/zip:password zip (or unzip) each file using password
These flags apply to ftp sources or destinations:
/auto auto-detect passive or active ftp (tries passive first)
/active use active ftp
/passive use passive ftp
/implicit use implicit FTPS (default for FTPS)
/explicit use explicit FTPS
/ignorecertificate ignore any certificate errors
/retries:n the number of retries on error (default is 1 for disk, 3 for ftp)
These flags apply only to the source:
/shadow Uses volume shadow copy. Local drives only.
It should be apprecaited that arguments are not case sensitive, so /SUBS and /subs have the same meaning. Also, for most flags you can use just the first letter. If the first letter isn't unique then use the first couple or letters or the flag in full.
What these flags mean:
- /help
- Displays the same information as shown above. This is intended as reminder of what command line flags can be used.
- /continue
- If an error is encountered while copying then continue copying other files. The default behaviour is to not copy any further files when an error is encountered.
- /delete
- Delete obsolete files (the default is to keep them). Without this flag new and modified files will be copied to the FTP server but any files (or folders) that have been removed from the source folder would not be removed from the server.
Tip: Be sure that you are copying to the right place before you add the /delete flag.
- /er:error-log-file
- Not yet implimented.
- /threads:n
- Specify the maxinum number of files that can be copied at once. The default is 1. The maximum is 7.
This allows true multi-tasking in the tool. So it can copy multiple files at once. Each thread will copy a file, delete files or plan what needs copying.
Tip: Recommend that you set this to 3.
- /l:log-file
- Not yet implimented.
- /newer
- Do not overwrite newer files with older ones. By default files will be copied if they are newer or if the file size is different. Specifying the /newer flag means that an older file won't be overwritten even if the file size is different.
- /ifdifferent
- Files are only copied if their CONTENT is different. Normally whether or not a file is copied is determined by its file date (and possibly the file size). If the file size is the same, and the file date would normally indicate that it should be updated, then with the /ifdifferent flag the file contents is read and a byte-wise comparison made to determine if the content of the file has actually changed, and only if there is a different is the file copied. This is slow, because the destination file must be read.
Tip: Don't use this unless you have a good reason to. If you aren't sure when you would use it then don't use it.
- /output:none
- No console output. Nothing will be displayed as CryCopy is running. Errors are the only exception, which will still be shown.
- /output:summary
- While copying CryCopy will display a count of the number of files and folders copied and remaining to be copied.
- /output:files
- While copying CryCopy will display each file as it is copied. It is worth being aware that the file name is displayed as copying begins, not when copying ends. When you have multiple threads be aware that one thread might still be copying a large file even though several other files have been shown afterwards.
- /output:verbose
- While copying CryCopy will display each file as copying beings. It will also display diagnostic information, such as why a file was (or was not) copied.
This can produce a lot of output.
Tip: Don't use /output:verbose unless you want to understand why a file was skipped or copied.
- /quiet
- Suppresses the "CryCopy version ..." banner that is normally displayed.
Tip: This can be used with the /output flag, so you could see what files are being copied without the normal start-up banner being shown.
- /u:username
- Specifies the username to use for FTP connections. If no username is used then the "anonymous" account is assumed. You must specify the /source or /destination flag before using /u. You can therefore use the /username flag twice, once for the source and once for the destination.
- /p:password
- Specifies the pasword used for FTP connections. If no password is specified then the password is taken to be empty. You will not be prompted for a password.
- /readonly
- Allow readonly files to be overwritten. Read only files will not be overwritten unless this flag is specified.
- /subs
- Consider subdirectories. Without this flag only the contents of the source folder will be copied and any sub-directories will be ignored.
Tip: Mostly you will probably want to use this flag.
- +copy-spec
- Wildcard expression for files to copy. Multiple copy specs can be supplied, but each must be prefixed with "+". Only files which match one of the copy-specs will be copied. If no copy spec is provided then "*" is assumed, i.e. match everything.
- -exclude-spec
- Wildcard expression for files not to copy. Files which match one of the
exclude-specs are not copied.
A trailing slash ("\") indicates a directory to exclude.
Unlike the "#" option, files that are excluded are treated as though they didn't exist - which means that they will be eligible for deletion (if the /delete flag has been specified).
- #ignore-spec
- Specifies a wildcard expression for files to ignore (and not delete at the server). A trailing slash ("\") indicates a directory to ignore. Multiple files or folders can be ignored by including multiple # arguments.
- ^move-spec
- Wildcard expression for files to move (copy then delete source). When a file is copied which matches the "move-spec", that file is copied and then deleted from the source folder. This is useful when files need to be transferred to a destination and are no longer required once they have been copied.
- !delete-spec
- Wildcard expression for files to delete at the destination, even if they exist at the source.
Tip: Don't use this unless you have a very good reason for it.
- /source
- Indicates that any following /u, /p, /zip, /auto, /passive, /implicit, /explicit, /ignorecertificate or /retries flags, apply to the source.
- /destination
- Indicates that any following /u, /p, /zip, /auto, /passive, /implicit, /explicit, /ignorecertificate or /retries relags, apply to the destination.
- /zip
- When applied to the destination, each file is zipped individually as it is copied. So if the source contains a file called "my.doc" then "my.doc.zip" will be copied to the destination.
When applied to the source, each zip file is uncompressed as it is copied. If the zip file contains more than 1 file, or if the password is incorrect then the zip file is copied as is without any attempt to unzip it.
- /zip:password
- Same as /zip except that it uses the supplied "password" for each zip archive. All files are zipped (or unzipped) using the same password.
Tip: If you are using CryCopy to backup files and need to ensure GDPR compliance then consider zipping with a password.
- /auto
- For an FTP source or destination, connect using PASSIVE FTP and if that fails then try ACTIVE.
- /active
- For an FTP source or destination, connect using ACTIVE FTP.
- /passive
- For an FTP source or destination, connect using PASSIVE FTP.
- /implicit
- For FTPS connections, use implicit FTPS.
- /explicit
- For FTPS connections, use explicit FTPS.
- /ignorecertificate
- Ignore any certificate errors.
Tip: You should investigate certificate errors and not ignore them. If the FTP server is using a self-generated certificate then it will typically give rise to a certificate error (because it isn't trusted) and this flag will allow that error to be ignored.
- /retries:n
- When a copy/write error occurs this allows the number of retries to be specified.
The defaults are probably reasoanble. For local disks the default is 1, which means that it won't retry on error. For FTP the retries is set to 3, which allows for small network outages.
- /shadow
- Use volume shadow copy. This applies to the source and only for local drives.
Tip: Use this if you need to copy files that would otherwise be locked or might be changing during a copy, such as database files or virtual machines. Don't use it unless you need to because it introduces a substantial delay at the start while the volume shadow copy is created.
More Information
For more information please refer to one of the following pages: