www.cryer.co.uk
Brian Cryer's Web Resources

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 <Source> <Destination> [/C] [/delete] [/D:date] [/E:Logfile]
        [/L:logfile] [/M] [/N] [/O] [/P:pass] [/R] [/S] [/U:user] [/Vn]
        [/Active] [/Passive] [/1] [+copy-spec]
        [-ignore-spec] [/T:xxx]
Flags:-
  /A:ascii-spec  Specify ASCII files (for FTP only).
  /Active  Use ACTIVE FTP (for FTP only).
  /C    Continue if an error occurs.
  /CH:xxx Chmod new file and sub-directory setting (FTP only).
  /ChmodF:xxx  Chmod new file setting (FTP only).
  /ChmodS:xxx  Chmod new sub-directory setting (FTP only).
  /delete  Delete obsolete target files (default to keep them).
  /D:date  Only copy files modified on or after the specified date.
  /1    Allow a one second time drift between source and destination.
  /2    Allow a two second time drift between source and destination.
  /E:LogFile Error log file. Errors appended to.
  /I    Ignore errors - use with /C to allow /Delete after errors encountered
  /L:LogFile Logfile to log to. Overwritten each time.
  /M    Make (i.e. create) target directory if it does not exist
  /N    Only copy Newer files
  /O    Do not delete destination files that predate the start date
  /P:pwd   Password. Used for ftp connections.
  /Passive  Use Passive FTP (for FTP only). Default is Passive then Active.
  /R    Overwrite Read-only files.
  /S    Consider sub-directories.
  /T:xxx   Temporary file prefix, causes copy to temporary file first.
  /U:uid   Username. Used for ftp and network connections.
  /V0   Suppress progress summary.
  /V1   More Verbose output. Lists everything that is copied or deleted.
  /V2   Very Verbose output. Lists every action.
  /V:E   Verbose-Explain.
  +copy-spec  Wildcard expression for files to copy.
  -exclude-spec  Wildcard expression for files not to copy.
  ^move-spec  Wildcard expression for files to move (copy then delete source).
  #ignore-spec  Wildcard expression for files to ignore (and not delete).
                a trailing slash ("\") indicates a directory not to copy.
For FTP connections use ftp://server/dir
CryCopy is produced by www.cryer.co.uk
This version expires on 31/12/2012

What these flags mean:

/A:ascii-spec
Specify a file type which will be treated as ASCII when copying across FTP. Multiple files can be specified as ASCII files by including multiple /A: arguments.
 /Active 
To use ACTIVE FTP semantics only when copying across FTP. The default is to use PASSIVE and then fall back to ACTIVE.
 /C
Continue if an error occurs when copying a file.
 /CH:xxx
Chmod new file and sub-directory setting (FTP only).
 /ChmodF:xxx
Chmod new file setting (FTP only).
 /ChmodS:xxx
Chmod new sub-directory setting (FTP only).
 /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 that have been removed in the source folder would not be removed at the server.

Note:

  • Obsolete files are deleted only once all other file copying has completed. This is by design.
  • Should an error occur during the copy process then obsolete files will not be removed, unless the /I flag is specified. This is by design.
/D:date
Only copy files modified on or after the specified date.
/1
Allow a one second time drift between source and destination.
/2
Allow a two second time drift between source and destination.
/E:LogFile
Error log file, to which any errors will be appended.
/I
Ignore errors - use with /C to allow /Delete after errors encountered. Normally if any errors were encountered then obsolete files will not be deleted, this is by design. With the /I flag obsolete files will be deleted even if a copy error occurs.
/L:LogFile
Logfile to log to. Overwritten each time.
/M
Make (i.e. create) target directory if it does not exist. This is whether the top most directory should be created if it does not exist, sub directories are always created (assuming the /s flag is specified).
/N
Only copy Newer files.
/O
Do not delete destination files that predate the start date.
/P:pwd  
Password. Used for ftp connections.
/Passive
Use Passive FTP (for FTP only). Default is PASSIVE then ACTIVE.
/R
Overwrite Read-only files.
/S
Consider subdirectories. Without this only the contents of the source folder will be copied and not any sub-directories.
/T:xxx
Temporary file prefix, causes copy to temporary file first. This is useful when the copying of files takes any appreciable length of time, and its use is aimed specially at updates to web sites (although it can be used in any scenario). When /T:xxx is used it causes all file copy operations to copy to a temporary file (which has the same name and location as the destination file in the copy process but with the specified prefix added to the name). Once the copy has completed then the destination file is deleted and the new file renamed. The benefit of this when updating a web-server is that it means that a web-server will never see a partially downloaded file (or page) - as the file is either the original or the new version but never a partially copied updated file.
/U:uid
Specifies the password to use with FTP and network connections. If no password is specified then the password is taken to be empty, the tool will not prompt for a password.
/V0
Suppress progress summary. Normally on the command line CryCopy will display a short summary of how many files and folders it has considered and how may it has yet to consider.
/V1
More Verbose output. Lists everything that is copied or deleted.
/V2
Very Verbose output. Lists every action.
/V:E  
Verbose explain. For every file copy event this causes the reason to be shown.
+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.
^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.
#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.

It should be appreciated that only the first one or two letters are significant, and that arguments are not case sensitive. So "/s" is the same as "/subs".

More Information

For more information please refer to one of the following pages: