Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Use a .bat file to open a database routine/menu driven system  (Read 2132 times)

0 Members and 1 Guest are viewing this topic.

BrianIrish

    Topic Starter


    Starter

    Windows XP Professional, V5.1, 1 million megs RAM

    In Notepad I place the following text and save it as a .bat file:

    :: ATMS Applications
    :: Links to latest version of the ATMS queries, forms, and reports
    ::
    @echo on
    copy /y C:\Documents and Settings\user\Data\Paula Axlerod.html “&temp&\ Paula Rivera.html”
    start “&temp&\ Paula Axlerod.html”
    cls
    exit

    Using the DOS commands  shown above I get the following errors:

    does not recognize double quotation marks" (")
    can not find the file specified"
    'temp' is not recognized as an internal or external command

    Any help would be greatly appreciated.

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: Use a .bat file to open a database routine/menu driven system
    « Reply #1 on: May 07, 2008, 08:24:22 AM »
    Provided temp is defined, this should work:

    Code: [Select]
    :: ATMS Applications
    :: Links to latest version of the ATMS queries, forms, and reports
    ::
    @echo on
    copy /y "C:\Documents and Settings\user\Data\Paula Axlerod.html"  “%temp%\ Paula Rivera.html”
    start “%temp%\ Paula Axlerod.html”
    cls
    exit

    Those ampersands flashed me back to mainframe JCL :o

    Note: You can also make user a replaceable variable by using %username%
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    BrianIrish

      Topic Starter


      Starter

      Re: Use a .bat file to open a database routine/menu driven system
      « Reply #2 on: May 08, 2008, 04:57:13 PM »
      Sidewinder,

      Thank you for your assistance!

      Brian