[Select]

User Guide: Copying, Moving and Renaming Files


 

Copying, Moving and Renaming Files

  • Copying within a directory
  • Copying between directories
  • Moving files

There will be many occasions when you wish to make a copy of a file. You might need to do this for security reasons, keeping a copy in case your original is accidentally deleted or the disc is damaged, etc. or you may want to make a copy of a document before you make alterations to it so that you can revert to the previous version if necessary.

This chapter will describe the actions to copy a single file or group of files but the procedures are exactly the same for copying a folder or group of folders.

Copying within a directory

As previously described this option is found on the Selection sub-menu of the Filer menu. You must use this method to copy within a directory as this is the only way you can give a different name to the copy. You must do this when copying in the same directory since you can't have two files or directories (or a file and a directory) with the same name in a directory.

Begin by either selecting the file or folder you want to copy or placing the mouse pointer over the object you want to copy when you press MENU to open the Filer menu. Because you must rename objects when copying in the same directory and you can only rename one object at a time if more than one object is selected when you open the Filer menu you will find that the Copy option is feint and can't be used.

Assuming that you have only selected a single object slide the mouse pointer off Copy on the Selection sub-menu to open the Copy window. This is similar to the New Directory window previously described and you use it in a similar way.

The name of the selected file or directory will appear in the Copy window. You will need to alter this or delete this name and enter a completely new name. When you have done this either press the Return key or click on the 'OK ' button and the file or directory will be copied.

With a file this will probably be very quick, unless it's a very large file, but if you are copying a directory the operation may take some considerable time, especially if it contains a large number of files. During this operation a Filer Action window will open (unless Verbose has been set Off) to display progress, although if you are copying just a single file its appearance may be so brief as to be almost unnoticeable.

Copying between directories

You will almost certainly find that you need to do this much more often than copying within the same directory. The easiest way to copy objects to another directory is by dragging. The destination directory can be a different directory on the same drive or on a completely different drive, for example, copying from a floppy drive to a hard drive or visa versa.

The following exercise will illustrate this.

  1. Click with SELECT on the hard disc icon to open a directory viewer onto the root directory of your hard drive.
  2. Double-click with SELECT on the Tutorials folder to open that.
  3. Drag this new window to one side so that it is not obscuring the first window. You should now be able to see the two windows, The HardDisc4 root directory window and the Tutorials directory window.
  4. Move the pointer over the file ReadMe in the Tutorials directory and click and hold down the SELECT button. The file icon will become selected and inverted in colour. Now drag the file icon into the HardDisc4 directory and release the mouse button.
  5. The file will be copied as soon as you release the mouse button. It does not matter exactly where the pointer is when you release the button, as long as it is somewhere over the window you wish to copy into. If the Filer is currently set to Sort by name the file will be slotted in alphabetically. You now have a second copy of the ReadMe file.

Copying multiple files

Using the method described above you are not restricted to copying one file at a time. If you select a group of files or directories or a mixture of both then they will all be copied.

Select all the files or directories you want to copy by any of the methods described in Chapter 3. Now place the mouse pointer over any of these selected objects and click and hold down the ADJUST button and drag it to the destination directory. All the selected objects will be copied.

Note that you must use the ADJUST button for this to work properly, not SELECT. If you try to use SELECT then, as we have already seen, the object the mouse pointer is over when the button was pressed will be selected and all the others will be de-selected, so only that single object would be copied.

Renaming while copying

When you drag a file or directory to copy it the copy will have the same name as the original. There may be times when you want to give the copy a new name. For example, if you were writing a book the original might be called MyBook but you might want to keep backup copies at various stages called, say, MyBook1, MyBook2, MyBook3, etc.

You can use a variation of the method used to copy within a directory to simultaneously copy and rename a file or directory.

Open a directory viewer for the directory you want to copy so that you have both source and destination directories visible. Now use the method described in Copying within a directory but, after changing the name, don't press the Return key or click on 'OK'.

You will see an icon in the centre of the window. This will be the same as the icon for the file or application you are copying or, if it's a directory, it will be the folder icon. Drag this icon to the destination directory viewer and the object will be copied.

Obviously you can only copy items one at a time using this method.

When you copy directories using this method only the name of the directory you are actually copying will be changed, the contents remain the same.

Moving Files

The procedure for moving files is almost identical to copying by dragging but with one important difference. Before you hold down the SELECT or ADJUST button on the mouse, with your other hand press and hold down either of the Shift keys on the keyboard.

Now drag the object or objects just as if you were copying them, but if you keep the Shift key held down while you drag them you will find that the files will appear in the destination directory but will have vanished from the source directory; that is, they have been moved instead of copied.

If you are moving files between directories on the same drive this will be very fast. Even if you are moving a directory containing a lot of large files it will still be extremely rapid. This is because the actual files on the drive aren't physically moved to the new location, it's only necessary to re-arrange some of the information that describes where they appear in the directory structure.

If you are moving data between drives then it will be a lot slower. This is because the filer then has to actually copy each file in turn to the new location, then delete the original. Obviously this takes a lot more time, slightly longer than copying.

Warning

While you are carrying out any copy or move operations or any other operations which involve writing to the hard drive it is very important that you do not switch the computer off.

It is good practice to always use the proper Shutdown procedure before switching off any computer. If you switch off while file operations are being carried out there is a very high risk that some of the data on your hard drive could become 'scrambled' making the drive unreadable.

This won't permanently damage the drive, but you could have lost all your files and data forever.

Never move the computer while the drive is being read from or written to. It's a good idea not to move it while it's switched on anyway, but if the computer is jarred or shaken while the hard drive is in use it is possible for the read/write head to make contact with the drive platter. This can result in permanent damage.

Renaming

Earlier the use of Rename on the Selection sub-menu of the Filer menu was described. Previously this was the only way of renaming files or directories. From RISC OS 4 onwards a much simpler method can also be used:

To rename a file or directory place the mouse pointer over its name (not the icon itself) in a Filer window and click SELECT while holding down either Alt key. You'll find these keys at either end of the spacebar. The area in the Filer window where the name was will now change into a writable icon as shown below. Alter the name in the icon, then press Return and the name will be changed.

It is also possible to initiate the renaming operation using the Shift+F3 keyboard shortcut if these are enabled.

If you make a mistake and don't want the name to change then press Escape or click the mouse anywhere else in the filer window. The rename icon will vanish leaving the original name unaltered.

Advanced renaming features

RISC OS now has some powerful ways to rename your files. Multiple selected files can be renamed in quick succession by use of Shift + Enter rather than just the Enter key to complete each rename. To do this, select several files or directories and use the Alt key and SELECT mouse button on the first one as normal, then just use Alt + Enter to move to the next file to be renamed. Files are deselected as you go, until there are no more to be renamed.

Another powerful rename feature now available is that of changing the location of a file at the same time as renaming it. By including special directory path characters in its new name, you can instruct Filer to relocate the file into another part of the file system relative to the current location.

The ^ character (found on the 6 key on UK keyboards) is used by RISC OS filing systems to mean, up one directory. The . (fullstop) character is a directory separator. Using these characters you can specify a relative path when renaming. If the new path does not exist, Filer creates it.

As an example, you could specify a new name for a file as ^.^.a.b.RISCOS6. This would mean go up two levels from the current directory then go into a directory called a, and inside that, one called b and put the new file called file RISCOS6 in there. The old file would disappear as it moved and if necessary, the new directory path would be created.

Illegal characters in filenames

There are some reserved characters that you cannot use in RISC OS file or directory names. Most of these are not permitted because they have some 'special meaning'. For example, we have already said that you should not use '!' as the first character of a directory name as RISC OS assumes that any directory name beginning with '!' is an application directory.

The following characters are not allowed -

$, %, &, *, #, @, ", |, ^, and the full stop '.' and colon ':'

You can't use a "normal" space character in a file or directory name. However you can use what is known as an Alt Space. This is the character that you would get on screen if you held down ALT and pressed Space in an Edit window. This produces ASCII character 160 instead of 32 (the 'normal' space) and as this character is defined as a blank in most fonts it will still look like a space but, since it actually isn't one, it's permitted. RISC OS Six does this for you automatically if you type a 'normal' space when creating or renaming a file, but many applications won't permit a space to be used when saving files, so you will then need to use Alt-Space.

It is also best not to use the forward slash '/' character as although this isn't forbidden it has a special meaning described below.

It is bad practice (and ugly) to use all upper case names. In case 'ugly' and 'difficult to read' aren't enough there is also a practical reason. With most fonts, especially the default Homerton, upper case letters are a lot bigger than lower case, so names are longer and even quite short names may be too long to fit in the space allocated in a filer window. This means that the end of the name might not be visible. For example -

    LatestVersion
    LATESTVERSION

but the all upper case name might appear as -

    LATESTVERS

even if the mixed case version fitted in the space provided with room to spare.

Transferring files to other systems

As we said earlier RISC OS identifies files by their Filetype . This is specific to Acorn format discs, and most other operating systems, including CD ROMs, use a system known as the Dot Extension. This means that after the descriptive name of the file there is a full stop (the 'dot') and then a three (now sometimes four or more) letter extension which defines what type of file it is.

Some extensions are specific to particular programs but many of them are more general, such as TXT for a plain text file, JPG for a Jpeg graphic image, ZIP for a compressed Zip file, and so on.

Since the full stop is not allowed in RISC OS filenames there has to be another way of representing these extensions. This is done by substituting the '/' (forward slash) character. This means that if you are looking at a CD ROM or DOS format disc in a filer window you would see 'README/TXT' instead of 'README.TXT'.

RISC OS has a module called MimeMap which, when it sees a file on a CD ROM or DOS format disc with an extension that it 'knows' about, displays it with an equivalent RISC OS filetype icon, thus making it much easier to identify the type of file.

If you want to transfer a file to a computer running another operating system, for example, Windows, you can do so on a DOS formatted floppy disc, but you would need to add the appropriate extension, using '/' instead of a full stop. If you don't do this then the other machine won't know what type of file it is.

Next


This documentation is copyright 3QD Developments Ltd 2013 and may not be reproduced or published in any form without the copyright holder's permission. RISC OS is subject to continuous development and improvement as such all information is provided by 3QD Developments Ltd in good faith and is believed to be correct at the time of publication E&OE. 3QD Developments Ltd cannot accept any liability for any loss or damage arising from the use of any information provided as part of the RISC OS Documentation.

HTML document version r23142 (3rd November 2015)