=======================

COPY filePro User Menus

=======================



The Perl script "copy_menu.pl" can be used to copy a filePro User Menu,

copying the Shell Scripts or Batch Files executed by Action Command Lines

on the Menu, and editing those Action Command Lines to call the Scripts or

Batch Files by their new name.  Any "orphan" script/batch files (those not

executed by Action Command Lines, but named for the Menu) will also be

copied.



The script may be renamed to whatever you like, keeping this in mind:



  On UNIX/Linux it is important to edit the first line of the script to

  reflect the full pathname of the "perl" executable on the system.



  On Windows it is important that the script have the extension ".pl" (if

  you, as I do, want to put a shortcut to it on your DeskTop and execute

  it by clicking on it).



  On Windows, to use it with MENU EDIT II as described below, you will

  need to create a Batch File by the same name, but with the ".bat"

  extension, and have it in your PATH.  That file may be as simple as

  (assuming "perl" is in your PATH):



    @echo OFF

    perl C:\Path\to\copy_menu.pl



Upon an escape to the command line by typing an unprompted ! at the MENU

EDIT II Main Menu prompt line and executing:



     copy_menu.pl   # UNIX/Linux

or

     copy_menu      # Windows



If that program is in your PATH you'll see:

_____________________________________________________________________________



  copy_menu.pl  [v1.0.0]  (C)2005 Bob Stockler



  Copy a filePro User Menu, editing the Menu to copy any Shell Scripts,

  and editing the Action Command Lines that execute them.



                  Copy the filePro User Menu: MenuName



          Enter the name for the copied Menu: _

_____________________________________________________________________________



where "MenuName" is the name of the menu currently being edited.



After the Menu is copied, and "exit" entered to return to the MENU EDIT II

program, type Q to exit MENU EDIT II.  You may then check the Menu by its

new name to assure that the renaming was successful.



To copy a Menu other than the current one being edited, at the command

line prompt enter:



    ME2MENU="" copy_menu.pl     # UNIX/Linux

or:

    set ME2MENU=                # Windows

    copy_menu                   # Windows



While this is not a program you might often use, it is a genuine convenience

when you do need to copy a filePro User Menu.



NOTE: In MENU EDIT II an escape to the command line is controlled by the

      file "ME2SHELL.AOK" in the "me2" filePro file directory.  The mere

      existance of that file enables such escapes on Windows.  On UNIX or

      Linux the users login name must be on a line by itself in that file.



The Perl script "copy_menu.pl" is Copyright (C)2005 Bob Stockler.  It may

not be sold or given away, or used on any system not fully licensed to use

MENU EDIT II.



Bob Stockler - Mon Oct 10 10:10:10 EDT 2005



                                 - 0 - 0 - 0 -

