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
The Save+Copy.wcm macro
(1) saves the
current file you are working on, and then
(2) immediately makes a copy of it on another previously specified drive (see important note below).
For convenience you can assign it to a keyboard shortcut or toolbar button, as described in the Tips below,
and use it instead of the program's built-in File, Save or File, Save
As features. That way you can use either method "on demand" according
to your needs.
Important
First, download
and extract the Save+Copy.wcm macro from inside the SaveCopy.zip
file and place it in your default macro folder as shown on the Tools, Settings, Files, Merge/Macro (tab). (See here for help if you need it.)
Then, 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:
[1] Just open the macro file for editing with Tools, Macro, Edit.
[2] Then make the changes following the instructions at the top of the
macro's code.
[3] Finally, click on Save & Compile on the macro toolbar (or
use File, Save). You can then close the macro file.
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. (See Footnote 1.) The other settings in the Modification
Area let you specify the type of path on the alternate drive. (See the next section below.)
Note that specifying a network drive can sometimes be problematic with any
save-to-disk method. If WordPerfect needs to access a network drive
that is not available to your computer or is slow to become available
(e.g., sometimes it can take several minutes for the computer to access
the network), the program itself can become slow to open or even freeze
up. (See Section II on the RepairDocs.html page here
for some related slow opening or freezing issues.) Obviously this is
not primarily an issue with the macro but with your particular computer
setup. If it happens you could specify a non-network local drive or removable disk.
After you have made (and saved) the above
modification(s) to Save+Copy.wcm play the macro while editing a document. Try it with
a simple, non-essential test document first so you can see how it operates.
As noted, you may
want to assign the macro to a
keystroke combination, toolbar button, or menu item to make it quick and easy to play. These methods are found here. Also see the tips section below.
Finally, by design 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 without saving anything.
The usual caveats
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 various versions of WordPerfect, and many others have reported success with it, it may not work
with every software or hardware set up. You are advised to make manual 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.
Note that, unlike many macros on this site,
no menu will appear when you play the macro, and if the current
document is blank no error message will appear. This was done to make
its operation quicker and more transparent to the user. [However,
messages will appear if the macro cannot find the target drive or
folder.]
Caution
It is not advisable to make all backups
of files in different source folders to the same "backup" folder on
another 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. [If enabled, WordPerfect's own automatic single-backup-per-file method (here) follows this rule, too.] 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 (for those who still use them): 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. [This macro was originally released in 1999 and floppies were still commonly used.]
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 in the current document and then play
Save+Copy.wcm to save and copy the current file. (That is, 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
[...Continued from above:]
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.
Similarly, inserting an external (USB) hard drive or flash drive causes Windows to assign the next available letter.
If you want to change the assigned letter, or if you have an
externally attachable drive (e.g., USB drive) and
want to assign a permanent(*) letter to it:
This
method uses your Windows Control Panel's Disk Management module (see under
Control Panel's's Administrator Tools > "Create and format hard disk
partitions").
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 versions of Windows, you can even use drive
letters A and
B (which, years ago, were reserved on computers that came with floppy
drives. 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. The
name will then appear in Windows (or File) Explorer or any file manager
utility, adjacent to the drive letter.
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. Windows will alert you to this and give you this option.
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 |