Home Page The Club Computers News Links Glossary EYAWTK
Before Amiga Background ICS OCS ECS AGA ??? PPC
U-Boot SLB Linux Amiga OS Dual Boot Motherboards Peripherals Other
Initialisation Installation OS4 Updates About OS4 File Systems Networking Printing Other
Introduction File System Workbench Preferences Commands Error Msgs Miscellaneous

AmigaOS 4.0 - About OS4 - Commands

MOVE AmigaDOS
Purpose: To move or rename files and directories.
Format: MOVE [FROM] {<name | pattern>} [TO] <name | pattern> [Q | QUIET] [BUF | BUFFER=<n>] [NOREQ | NOREQUESTERS] [NOREP | NOREPLACE] [INTER | INTERACTIVE] [FORCE] [COPYLINKS] [FOLLOWLINKS]
Template: FROM/M, TO/A, Q=QUIET/S, BUF=BUFFER/K/N, NOREQ=NOREQUESTERS/S, NOREP=NOREPLACE/S, INTER=INTERACTIVE/S, FORCE/S, COPYLINKS/S, FOLLOWLINKS/S
Path: C:MOVE
MOVE copies the file(s) or directory(s) specified with the FROM argument to the file or directory specified by the TO argument, removing the source file after the copy has been created (thus, 'moving' the files). You can move several items at once by giving more than one FROM argument; each argument should be separated by spaces. You can use pattern matching to move or exclude items whose names share a common set of characters or symbols.

If a TO filename already exists, MOVE overwrites the TO file with the FROM file except when the NOREP or NOREPLACE option has been specified. If you name a destination directory that does not exist, MOVE will create a directory with that name. You can also use a pair of double quotes ("") to refer to the current directory when specifying a destination. (Do not put any spaces between the double quotes.)

If the FROM argument is a directory, its files, subdirectories, and the subdirectories' files will be moved. If you want to move a directory and you want the copy to have the same name as the original, you must include the directory name in the TO argument.

MOVE displays to the screen the name of each file as it is moved. This can be overridden by the Q or QUIET option, or the local shell variable _Verbosity with a negative value.

The BUF or BUFFER option is used to set the number of 512-byte buffers used during the copy. The default is 200 buffers, approximately 100K of RAM. It is often useful to limit the number of buffers when copying to RAM:. BUF=0 or BUFFER=0 uses a buffer the same size as the file to be copied.

Normally MOVE displays a requester if the move cannot continue for some reason. When the NOREQ or NOREQUESTERS option is given, all requesters are suppressed. This is useful in scripts and can prevent a MOVE failure from stopping the script while it waits for a response. For example, if a script calls for a certain file to be moved and the system cannot find that file, normally the script would display a requester and would wait until a response was given. With the NOREQ or the NOREQUESTERS option, the MOVE command would be aborted and the script would continue.

The INTER or INTERACTIVE option checks if the destination file already exists. In this is the case, you will be prompted to confirm whether you want the file to be overwritten (answer 'y' for 'yes').

The FORCE option can be used when the destination file cannot be created because there is already a file with the same name that is protected against deletion or writing, in which case the protection will be removed first before the destination file is created.

The COPYLINKS option specifies that MOVE should copy the contents of a file referenced by a hard or soft link. The default is to skip copying linked files.

The FOLLOWLINKS option specifies that MOVE should follow hard and soft links to directories. The default is to skip links to directories.

Example 1:

3.OS4:> MOVE File1 TO File2 renames File1 in the current directory to File2.

Example 2:

3.OS4:> MOVE File2 TO /Dir2 moves File2 in the current directory to the Dir2 directory on the same device.

Example 3:

3.OS4:> MOVE /Dir2/File2 TO "" moves File2 in the the Dir2 directory to the current directory.

Example 4:

3.OS4:> MOVE File1 TO :Work/File2 moves File1 in the current directory to File2 in the Work directory on the same device.

Example 5:

3.OS4:> MOVE (#?.info) TO DF1:Backup
   a..moved.
   b..moved.
    .
    .
   z..moved.
moves all the files not ending in .info in the current directory to the Backup directory on the disk in DF1:. This is a convenient use of pattern matching to save storage space when icons are not necessary.

Example 6:

3.OS4:> MOVE Work:Test TO DF0:Test
   a..moved.
   b..moved.
    .
    .
   z..moved.
moves all the files and any subdirectories of the Test directory on Work to the Test directory on DF0:. If a Test directory does not already exist on DF0:, AmigaDOS will create one.

Example 7:

3.OS4:> MOVE DF0: TO DF1: QUIET moves all files and directories on the disk in DF0: to DF1:, without displaying on the screen any file/directory names as they are moved.


Return to Commands Selection

Disclaimer: Amiga Auckland have prepared the above information for the use of its members based on our experiences and as such is subject to revision at any time. Amiga Auckland cannot guarantee any of the information and cannot be held accountable for any issues that may result from using it.


Copyright 2006 Amiga Auckland Inc. All rights reserved.
Revised: February 9, 2006.