Script Library: 1240 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 
View scriptLicenseDownload documentation as: HTML or editable
Download scriptHistoryOther scripts by: reboltof

Documentation for: xcopy.r


REBOL

xcopy.r

Contents:

1. Introduction
2. History
3. Description
4. Usage
4.1 Copy a file to a file
4.2 Copy a file to a directory
4.3 Copy a directory to a directory
5. Refinement
5.1 verbose
5.2 no-warn
5.3 filter

1. Introduction

This script implements the function 'xcopy.

2. History

Version

Date

Comment

Author

1.0

11-apr-06

Initial doc

reboltof

3. Description

'xcopy allows to execute selectives copies from/to different media.

4. Usage

4.1 Copy a file to a file

xcopy %origin-file-path.r %target-file-path.r

The origin file, which access path is %origin-file.r will be copy to the destination path %origin-file.r.

4.2 Copy a file to a directory

xcopy %origin-file.r %target-dir/

The origin file, which access path is %origin-file.r will be copy to the destination directory %target-dir/, using the same name as the original file.

4.3 Copy a directory to a directory

xcopy %origin-dir/ %target-dir/

All files and subdirectories of the origin directory %origin-dir/ will be copied under the destination directory %target-dir/.

The destination directory will be created if it does not exists. The structure of the subdirectories will be preserved.

5. Refinement

You can use following refinements for a more precise usage

5.1 verbose

xcopy/verbose %origin-dir/ %target-dir/

All actions will be feedbacked to the user, using the console.

5.2 no-warn

xcopy/no-warn %origin-dir/ %target-dir/

By default, 'xcopy asks the user's confirmation before overwritting an existing file. Using the refinement /no-warn allows the overwritting in all cases, without confirmation.

5.3 filter

xcopy/filter %origin-dir/ %target-dir/ [%.r %.bmp]

You can use this refinement to limit the copy to the files having the specified extension(s). The extension desired are always put into a block, also if there is only one:

xcopy/filter %origin-dir/ %target-dir/ [%.r]
MakeDoc2 by REBOL- 11-Apr-2006