|
Related macro -
See also MULTISAV,
which contains macros that (1) save your document with sequential
filenames or (2) save it whenever you enter a hard return. Related topics -
WordPerfect's
built-in backup features and other backup methods
|
Purpose
This Save+Copy.wcm macro (1) saves
the current file and (2) immediately makes a copy on another
drive previously specified by the user.
|
Important
First, download
and extract the Save+Copy.wcm macro from the SaveCopy.zip
file, and place it in your default macro folder as shown in the Tools, Settings, Files, Merge/Macro tab. (See here for help if you need
it.)
Before playing the Save+Copy.wcm macro
you must insert your preferred alternate drive's letter in the
User Modification Area at the beginning of the macro's code, and the name
of a special alternate folder on that drive (if you require it). The other settings (i.e., to display or suppress
messages) in the modification area are optional.
This is easy to do:
Just open the macro for editing with Tools, Macro, Edit; then
make the changes following the instructions at the top of the
macro's code; then click on Save & Compile on the macro toolbar
(or use File, Save).
Macros are just a special type of WordPerfect
document (a macro's filename ends with .wcm). They contain commands
that WordPerfect should carry out. See "Downloading,
Documentation, Modifications, and Support".
This modification will tell the macro which
drive to use to store the copy of your current file. The
default is drive E:, but you can set it to any existing drive
that has a permanently assigned drive letter. [Footnote 1] The other settings
in the Modification Area let you specify the type of path on
the alternate drive. See below.
After you have made the above modification(s),
play the macro while editing a document. (Try it with a simple
test document first so you can see how it operates.) You may
want to assign the macro to
a keystroke combination, toolbar button, or menu item. Also see
the Tip
at the bottom of this page.
Note that this macro will not play inside
another macro file (*.WCM) while you are editing that other macro. If you try to do so, a message will pop
up and then the Save+Copy macro will exit (abort).
You use this macro, like all materials on this site, solely at your own risk.
While it has been tested thoroughly by the author on his version
of WordPerfect, it may not work with every software or hardware
set up. You are advised to make backups of any important files
before using it and to test it on your own system(s) to assure
yourself that it will reliably meet your needs. See this site's
Disclaimer.
Related topics
WordPerfect's
built-in backup features and other backup methods
|
Overview and methods
When you play the macro is will first
save the current document to the currently open folder, the same
as if you use File, Save.
If the document has not yet been saved, it
will open the File, Save As dialog so that you can name it. (With
File, Save As, you can also select a different folder in which
to save the document; that folder -- and the path to it -- can
be used to make a copy on the other drive, in the same relative
folder as the original. See next paragraphs.)
Then -- depending on how you set up
the macro (see above) -- the macro will
immediately make a copy of the current document in either -
(1) the same relative path and folder on the
target drive that is used to save the current document on the
source drive (e.g., if the source is C:\Users\Barry\Documents, the
copy will be made to H:\Users\Barry\Documents if drive H was chosen as the alternate drive in the macro's
code);
or
(2) the same relative path and folder on the
target drive that is used to save the current document on the
source drive -- but located as a sub-folder under a user-specified
custom folder (e.g., \Special
Projects) on the target drive (e.g., H:\Special Projects\Users\Barry\Documents);
or
(3) a user-specified custom folder on the
target drive (e.g., \Special
Projects) -- but without the relative
path (see Caution below);
or
(4) the root directory of the target drive
(e.g., H:\) -- but without the relative path (see Caution below).
If the new directory/folder (or sub-folder)
does not exist on the alternate drive, the macro will create
it. A brief message will appear to inform you of the copy operation.
(You can disable the message; see the User Modification Area
at the beginning of the macro's code.)
The best way to see how the macro works is
to create a test document and use different settings in the User
Modification Area when you play the macro while editing that
test document.
|
Caution
It is not advisable to make all backups of
files in different source folders to the same "backup"
folder on another hard drive, since this could allow one or more
files with the same name being backed up into this folder, accidentally
overwriting earlier -- but possibly different -- files. Therefore,
use Methods 3 and 4 above with caution.
Methods 3 and 4 are probably more appropriate
for use with removable drive, where you know you will be removing
the media before going on to another task; or where a specially
modified and differently named copy of Save+Copy.wcm is used
for a given project; or where the macro has been set in the User
Modification Area to always prompt you before overwriting a backup.
Methods 1 and 2 have a one-to-one relation
to the source folder and document, so each new copy will overwrite
the previous version of the copied file, as you would expect.
Most users will probably choose Method 1 (the default)
or Method 2. |
Notes
Relative paths: As noted above, the first and second methods use
the same relative path as the original document, a technique
used by some third-party backup software programs. The backups
will then overwrite the files they are supposed to overwrite.
This should also make it easier to find archived files on large
drives with lots of files since they will have the same relative
path and name on both drives (unless you move them later!).
Floppy drives:
This macro makes a (rudimentary) check of the target drive to
see if it is a floppy drive (it simply looks for "a:\"
in the drive name), and if it appears to be a floppy, it uses
a prompted CopyFile command to help ensure nothing is inadvertently
overwritten, as well as to warn the user if the floppy disk is
full. For all other drive letters (b-z), the CopyFile function
is not prompted by default (this can be changed in the macro's
User Modification Area), on the assumption that you are copying to a
backup (or archive) drive and always want to overwrite any existing
file of the same name found in the same relative directory on
the target drive.
Tips
- You might find this macro easier to use if
you assign it to a toolbar button or keyboard shortcut. You can
also make multiple copies of this macro for different purposes,
and assign each "version" to a different toolbar button,
keystroke, or menu item. See http://wptoolbox.com/tips/EasyPlay.html.
- You may want to make this macro part of a
"double-keystroke" macro, such as the author's HRt+Save.wcm
(part of MULTISAV.ZIP). In the HR+Save
macro, you could replace the command FileSave with MacroFilePlay("Save+Copy.wcm"). Then, when you assign the HRt+Save macro to the
backslash key (as explained in a comment inside the HRt+Save
macro), a double press of the backslash key would enter a hard
return, then play Save+Copy.wcm to save and copy the current
file. (When you assign HRt+Save to the backslash key, a single
press of the backslash key will enter a backslash character,
as usual. Assuming you implement this Tip, pressing the backslash
twice in succession would insert a hard return, remove any backslashes
entered at that point, and then play the Save+Copy macro.)
- If you often save to a floppy disk,
you might be interested in the Corel shipping macro, SAVETOA.WCM.
Note, however, that this can be problematic unless you save to
a hard disk first. See "Never
save your work to a floppy disk first before saving it to your
hard drive. Never save your work only on a floppy disk: they
are more fragile than a hard drive."
|
Footnote 1
Internally installed PC drives have "permanent" or "fixed" drive
letters assigned to them, though some of their letters can be changed via a Windows Control Panel
setting. If you want to change the letter assignment, or if you have an externally attachable drive (e.g., USB drive) and
want to assign a permanent(*) letter to it:
For Windows XP see here; for Windows Vista see here; for Windows 7 see here.
Notes -
1.
This works for an externally attached drive only if the new drive
letter is not already in use (for another drive) when you hook up the
external drive again in the future to that computer.
For such
"frequently removable" drives it might be helpful to assign them a
letter further up the alphabet, such as drive X, Y, or Z -- i.e., an
available letter that is unlikely to be used for any other drive --
including memory card drives and virtual "mounted" drives -- on that
computer.
(On Windows Vista and later, you can even use A and
B. I find using the letters A and B helpful with two keyring USB
flash drives that are physically identical but which I want to use
separately with my backup system.)
2. It is also helpful to give a unique name
for the drive, such as MyBackups. You can do this in Windows Explorer
by right-clicking on the drive in the Explorer list and choosing
Rename (or Properties) from the context menu to rename the drive.
3. Attaching such a "re-lettered" drive to a different computer is unlikely to retain its new drive letter assignment on the other computer. It is the computer
that stores the drive letter assignment, not the drive itself, so you
probably would need to perform the drive letter reassignment on both
computers using the same external drive.
4. You may need Adminstrator permission to make such changes. Caution -
"Some programs make references to specific drive
letters. If you change a drive letter, these programs might not work
correctly." [-Microsoft support article] Hence, this is another good reason to use a letter further up the alphabet (see Note 1 above).
- - - - - * - Permanent means that it will stay the same until you change it again. - - - - -
Disclaimer |