A batch file or brain problem?

Archived from groups: microsoft.public.win98.gen_discussion (More info?)

Hi folks, I'm having a problem with a simple batch file. The OS is Win 98 SE
if that really matters.

Here is the file I put together, its hardly advanced.


cd.
copy c:\kingst~1\kingst~1.mdb c:\ktstore
copy c:\eye\kingst~1.mdb c:\kingst~1
cd\kingst~1
start kingst~2.mdb
copy c:\kingst~1\kingst~1.mdb c:\eye
copy c:\ktstore\kingst~1.mdb c:\kingst~1
exit

The folders that exist are
C:\eye
C:\Kingston upon thames
C:\ktstore

Files are, static in kingston upon thames is kingston tn code.mdb

The files which move about in my batch file is kingston data.mdb

The batch file starts with an alternate version of the latter in eye, and
the normal version in kingston upon thames.

What is supposed to occur is the standard version is copied to the ktstore
folder, then the copy of the non standard data is copied over the standard
one in kingston upon thames.

Then the database is run and you should then see the non standard data.

On exit, the non standard data goes to Eye, and the standard file is copied
back to Kingston upon thames again, thus preserving the main data file. The
batch file thus should allow two versions of the database to be accessed by
a fixed code file via Access.

Well, what in fact occurs, despite the on screen text claiming all the 1
file copied status, is that the file actually opened in the database is
still the old data file with the standard data.

I'm confused.. some would say it serves me right, but what am I doing wrong
here?

Brian


--

Brian Gaff....Note, this account does not accept Bcc: email.
graphics are great, but the blind can't hear them
Email: briang1@blueyonder.co.uk
______________________________________________________________________________________________________________
5 answers Last reply
More about batch file brain problem
  1. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    "Brian Gaff" <Briang1@blueyonder.co.uk> wrote in message news:RNO5e.8117$G8.2045@text.news.blueyonder.co.uk...
    > Hi folks, I'm having a problem with a simple batch file.


    > cd.
    > copy c:\kingst~1\kingst~1.mdb c:\ktstore
    > copy c:\eye\kingst~1.mdb c:\kingst~1
    > cd\kingst~1
    > start kingst~2.mdb
    > copy c:\kingst~1\kingst~1.mdb c:\eye
    > copy c:\ktstore\kingst~1.mdb c:\kingst~1
    > exit

    Try adding the "/w[ait]" switch to the start command. This will cause
    start to not return until the database program returns. What I'm guessing
    is happening is that by the time the database program loads the file, your
    batch has already copied back the original.

    start /w kingst~2.mdb


    > What is supposed to occur is the standard version is copied to the ktstore folder, then the copy of the non standard data is
    > copied over the standard one in kingston upon thames.
    >
    > Then the database is run and you should then see the non standard data.
    >
    > On exit, the non standard data goes to Eye, and the standard file is copied back to Kingston upon thames again, thus preserving
    > the main data file. The batch file thus should allow two versions of the database to be accessed by a fixed code file via Access.
    >
    > Well, what in fact occurs, despite the on screen text claiming all the 1 file copied status, is that the file actually opened in
    > the database is still the old data file with the standard data.
  2. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    batch file problem
    the OS proceeds to the next line of the batch file while your database
    program is loading and has already completed the last copy function before
    the files are loaded.

    change
    start kingst~2.mdb

    to
    start /w kingst~2.mdb

    the batch file will wait for you to exit the database before it continues
    and restores the original data


    --
    Adaware http://www.lavasoft.de
    spybot http://security.kolla.de
    AVG free antivirus http://www.grisoft.com
    Etrust/Vet/CA.online Antivirus scan
    http://www3.ca.com/securityadvisor/virusinfo/scan.aspx
    Panda online AntiVirus scan http://www.pandasoftware.com/ActiveScan/
    Catalog of removal tools (1)
    http://www.pandasoftware.com/download/utilities/
    Catalog of removal tools (2)
    http://www3.ca.com/securityadvisor/newsinfo/collateral.aspx?CID=40387
    Blocking Unwanted Parasites with a Hosts file
    http://mvps.org/winhelp2002/hosts.htm
    links provided as a courtesy, read all instructions on the pages before use

    Grateful thanks to the authors and webmasters
    _
    "Brian Gaff" <Briang1@blueyonder.co.uk> wrote in message
    news:RNO5e.8117$G8.2045@text.news.blueyonder.co.uk...
    > Hi folks, I'm having a problem with a simple batch file. The OS is Win 98
    SE
    > if that really matters.
    >
    > Here is the file I put together, its hardly advanced.
    >
    >
    > cd.
    > copy c:\kingst~1\kingst~1.mdb c:\ktstore
    > copy c:\eye\kingst~1.mdb c:\kingst~1
    > cd\kingst~1
    > start kingst~2.mdb
    > copy c:\kingst~1\kingst~1.mdb c:\eye
    > copy c:\ktstore\kingst~1.mdb c:\kingst~1
    > exit
    >
    > The folders that exist are
    > C:\eye
    > C:\Kingston upon thames
    > C:\ktstore
    >
    > Files are, static in kingston upon thames is kingston tn code.mdb
    >
    > The files which move about in my batch file is kingston data.mdb
    >
    > The batch file starts with an alternate version of the latter in eye, and
    > the normal version in kingston upon thames.
    >
    > What is supposed to occur is the standard version is copied to the ktstore
    > folder, then the copy of the non standard data is copied over the
    standard
    > one in kingston upon thames.
    >
    > Then the database is run and you should then see the non standard data.
    >
    > On exit, the non standard data goes to Eye, and the standard file is
    copied
    > back to Kingston upon thames again, thus preserving the main data file.
    The
    > batch file thus should allow two versions of the database to be accessed
    by
    > a fixed code file via Access.
    >
    > Well, what in fact occurs, despite the on screen text claiming all the 1
    > file copied status, is that the file actually opened in the database is
    > still the old data file with the standard data.
    >
    > I'm confused.. some would say it serves me right, but what am I doing
    wrong
    > here?
    >
    > Brian
    >
    >
    >
    > --
    >
    > Brian Gaff....Note, this account does not accept Bcc: email.
    > graphics are great, but the blind can't hear them
    > Email: briang1@blueyonder.co.uk
    >
    ____________________________________________________________________________
    __________________________________
    >
    >
    >
  3. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    Thanks both, I did sort of figure out what was going on by putting pause
    in to strategic points, but if the wait switch works, I'll use that instead.
    I must have skipped that part of the batch file info...:-)

    Brian

    --

    Brian Gaff....Note, this account does not accept Bcc: email.
    graphics are great, but the blind can't hear them
    Email: briang1@blueyonder.co.uk
    ______________________________________________________________________________________________________________


    "AlmostBob" <anonymous1@discussions.microsoft.com> wrote in message
    news:eKvXH8PPFHA.3072@TK2MSFTNGP09.phx.gbl...
    > batch file problem
    > the OS proceeds to the next line of the batch file while your database
    > program is loading and has already completed the last copy function before
    > the files are loaded.
    >
    > change
    > start kingst~2.mdb
    >
    > to
    > start /w kingst~2.mdb
    >
    > the batch file will wait for you to exit the database before it continues
    > and restores the original data
    >
    >
    > --
    > Adaware http://www.lavasoft.de
    > spybot http://security.kolla.de
    > AVG free antivirus http://www.grisoft.com
    > Etrust/Vet/CA.online Antivirus scan
    > http://www3.ca.com/securityadvisor/virusinfo/scan.aspx
    > Panda online AntiVirus scan http://www.pandasoftware.com/ActiveScan/
    > Catalog of removal tools (1)
    > http://www.pandasoftware.com/download/utilities/
    > Catalog of removal tools (2)
    > http://www3.ca.com/securityadvisor/newsinfo/collateral.aspx?CID=40387
    > Blocking Unwanted Parasites with a Hosts file
    > http://mvps.org/winhelp2002/hosts.htm
    > links provided as a courtesy, read all instructions on the pages before
    > use
    >
    > Grateful thanks to the authors and webmasters
    > _
    > "Brian Gaff" <Briang1@blueyonder.co.uk> wrote in message
    > news:RNO5e.8117$G8.2045@text.news.blueyonder.co.uk...
    >> Hi folks, I'm having a problem with a simple batch file. The OS is Win 98
    > SE
    >> if that really matters.
    >>
    >> Here is the file I put together, its hardly advanced.
    >>
    >>
    >> cd.
    >> copy c:\kingst~1\kingst~1.mdb c:\ktstore
    >> copy c:\eye\kingst~1.mdb c:\kingst~1
    >> cd\kingst~1
    >> start kingst~2.mdb
    >> copy c:\kingst~1\kingst~1.mdb c:\eye
    >> copy c:\ktstore\kingst~1.mdb c:\kingst~1
    >> exit
    >>
    >> The folders that exist are
    >> C:\eye
    >> C:\Kingston upon thames
    >> C:\ktstore
    >>
    >> Files are, static in kingston upon thames is kingston tn code.mdb
    >>
    >> The files which move about in my batch file is kingston data.mdb
    >>
    >> The batch file starts with an alternate version of the latter in eye, and
    >> the normal version in kingston upon thames.
    >>
    >> What is supposed to occur is the standard version is copied to the
    >> ktstore
    >> folder, then the copy of the non standard data is copied over the
    > standard
    >> one in kingston upon thames.
    >>
    >> Then the database is run and you should then see the non standard data.
    >>
    >> On exit, the non standard data goes to Eye, and the standard file is
    > copied
    >> back to Kingston upon thames again, thus preserving the main data file.
    > The
    >> batch file thus should allow two versions of the database to be accessed
    > by
    >> a fixed code file via Access.
    >>
    >> Well, what in fact occurs, despite the on screen text claiming all the 1
    >> file copied status, is that the file actually opened in the database is
    >> still the old data file with the standard data.
    >>
    >> I'm confused.. some would say it serves me right, but what am I doing
    > wrong
    >> here?
    >>
    >> Brian
    >>
    >>
    >>
    >> --
    >>
    >> Brian Gaff....Note, this account does not accept Bcc: email.
    >> graphics are great, but the blind can't hear them
    >> Email: briang1@blueyonder.co.uk
    >>
    > ____________________________________________________________________________
    > __________________________________
    >>
    >>
    >>
    >
    >
  4. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    for any windows program you can run from a dos window, try
    prog_name /?
    it mostly gives available switches

    --
    Adaware http://www.lavasoft.de
    spybot http://security.kolla.de
    AVG free antivirus http://www.grisoft.com
    Etrust/Vet/CA.online Antivirus scan
    http://www3.ca.com/securityadvisor/virusinfo/scan.aspx
    Panda online AntiVirus scan http://www.pandasoftware.com/ActiveScan/
    Catalog of removal tools (1)
    http://www.pandasoftware.com/download/utilities/
    Catalog of removal tools (2)
    http://www3.ca.com/securityadvisor/newsinfo/collateral.aspx?CID=40387
    Blocking Unwanted Parasites with a Hosts file
    http://mvps.org/winhelp2002/hosts.htm
    links provided as a courtesy, read all instructions on the pages before use

    Grateful thanks to the authors and webmasters
    _
    "Brian Gaff" <Briang1@blueyonder.co.uk> wrote in message
    news:MZT5e.8343$G8.8202@text.news.blueyonder.co.uk...
    > Thanks both, I did sort of figure out what was going on by putting pause
    > in to strategic points, but if the wait switch works, I'll use that
    instead.
    > I must have skipped that part of the batch file info...:-)
    >
    > Brian
    >
    > --
    >
    > Brian Gaff....Note, this account does not accept Bcc: email.
    > graphics are great, but the blind can't hear them
    > Email: briang1@blueyonder.co.uk
    >
    ____________________________________________________________________________
    __________________________________
    >
    >
    > "AlmostBob" <anonymous1@discussions.microsoft.com> wrote in message
    > news:eKvXH8PPFHA.3072@TK2MSFTNGP09.phx.gbl...
    > > batch file problem
    > > the OS proceeds to the next line of the batch file while your database
    > > program is loading and has already completed the last copy function
    before
    > > the files are loaded.
    > >
    > > change
    > > start kingst~2.mdb
    > >
    > > to
    > > start /w kingst~2.mdb
    > >
    > > the batch file will wait for you to exit the database before it
    continues
    > > and restores the original data
    > >
    > >
    > > --
    > > Adaware http://www.lavasoft.de
    > > spybot http://security.kolla.de
    > > AVG free antivirus http://www.grisoft.com
    > > Etrust/Vet/CA.online Antivirus scan
    > > http://www3.ca.com/securityadvisor/virusinfo/scan.aspx
    > > Panda online AntiVirus scan http://www.pandasoftware.com/ActiveScan/
    > > Catalog of removal tools (1)
    > > http://www.pandasoftware.com/download/utilities/
    > > Catalog of removal tools (2)
    > > http://www3.ca.com/securityadvisor/newsinfo/collateral.aspx?CID=40387
    > > Blocking Unwanted Parasites with a Hosts file
    > > http://mvps.org/winhelp2002/hosts.htm
    > > links provided as a courtesy, read all instructions on the pages before
    > > use
    > >
    > > Grateful thanks to the authors and webmasters
    > > _
    > > "Brian Gaff" <Briang1@blueyonder.co.uk> wrote in message
    > > news:RNO5e.8117$G8.2045@text.news.blueyonder.co.uk...
    > >> Hi folks, I'm having a problem with a simple batch file. The OS is Win
    98
    > > SE
    > >> if that really matters.
    > >>
    > >> Here is the file I put together, its hardly advanced.
    > >>
    > >>
    > >> cd.
    > >> copy c:\kingst~1\kingst~1.mdb c:\ktstore
    > >> copy c:\eye\kingst~1.mdb c:\kingst~1
    > >> cd\kingst~1
    > >> start kingst~2.mdb
    > >> copy c:\kingst~1\kingst~1.mdb c:\eye
    > >> copy c:\ktstore\kingst~1.mdb c:\kingst~1
    > >> exit
    > >>
    > >> The folders that exist are
    > >> C:\eye
    > >> C:\Kingston upon thames
    > >> C:\ktstore
    > >>
    > >> Files are, static in kingston upon thames is kingston tn code.mdb
    > >>
    > >> The files which move about in my batch file is kingston data.mdb
    > >>
    > >> The batch file starts with an alternate version of the latter in eye,
    and
    > >> the normal version in kingston upon thames.
    > >>
    > >> What is supposed to occur is the standard version is copied to the
    > >> ktstore
    > >> folder, then the copy of the non standard data is copied over the
    > > standard
    > >> one in kingston upon thames.
    > >>
    > >> Then the database is run and you should then see the non standard data.
    > >>
    > >> On exit, the non standard data goes to Eye, and the standard file is
    > > copied
    > >> back to Kingston upon thames again, thus preserving the main data
    file.
    > > The
    > >> batch file thus should allow two versions of the database to be
    accessed
    > > by
    > >> a fixed code file via Access.
    > >>
    > >> Well, what in fact occurs, despite the on screen text claiming all the
    1
    > >> file copied status, is that the file actually opened in the database is
    > >> still the old data file with the standard data.
    > >>
    > >> I'm confused.. some would say it serves me right, but what am I doing
    > > wrong
    > >> here?
    > >>
    > >> Brian
    > >>
    > >>
    > >>
    > >> --
    > >>
    > >> Brian Gaff....Note, this account does not accept Bcc: email.
    > >> graphics are great, but the blind can't hear them
    > >> Email: briang1@blueyonder.co.uk
    > >>
    > >
    ____________________________________________________________________________
    > > __________________________________
    > >>
    > >>
    > >>
    > >
    > >
    >
    >
  5. Archived from groups: microsoft.public.win98.gen_discussion (More info?)

    I just wanted to thank AlmostBob for having all those websites up for the
    convience of the consumer. Sure it does make for a longer post but it is
    nice that someone out there cares for the little person. This topic is
    fascinating to me because I am just starting to learn about batch files.
    <smile>

    "AlmostBob" wrote:

    > batch file problem
    > the OS proceeds to the next line of the batch file while your database
    > program is loading and has already completed the last copy function before
    > the files are loaded.
    >
    > change
    > start kingst~2.mdb
    >
    > to
    > start /w kingst~2.mdb
    >
    > the batch file will wait for you to exit the database before it continues
    > and restores the original data
    >
    >
    > --
    > Adaware http://www.lavasoft.de
    > spybot http://security.kolla.de
    > AVG free antivirus http://www.grisoft.com
    > Etrust/Vet/CA.online Antivirus scan
    > http://www3.ca.com/securityadvisor/virusinfo/scan.aspx
    > Panda online AntiVirus scan http://www.pandasoftware.com/ActiveScan/
    > Catalog of removal tools (1)
    > http://www.pandasoftware.com/download/utilities/
    > Catalog of removal tools (2)
    > http://www3.ca.com/securityadvisor/newsinfo/collateral.aspx?CID=40387
    > Blocking Unwanted Parasites with a Hosts file
    > http://mvps.org/winhelp2002/hosts.htm
    > links provided as a courtesy, read all instructions on the pages before use
    >
    > Grateful thanks to the authors and webmasters
    > _
    > "Brian Gaff" <Briang1@blueyonder.co.uk> wrote in message
    > news:RNO5e.8117$G8.2045@text.news.blueyonder.co.uk...
    > > Hi folks, I'm having a problem with a simple batch file. The OS is Win 98
    > SE
    > > if that really matters.
    > >
    > > Here is the file I put together, its hardly advanced.
    > >
    > >
    > > cd.
    > > copy c:\kingst~1\kingst~1.mdb c:\ktstore
    > > copy c:\eye\kingst~1.mdb c:\kingst~1
    > > cd\kingst~1
    > > start kingst~2.mdb
    > > copy c:\kingst~1\kingst~1.mdb c:\eye
    > > copy c:\ktstore\kingst~1.mdb c:\kingst~1
    > > exit
    > >
    > > The folders that exist are
    > > C:\eye
    > > C:\Kingston upon thames
    > > C:\ktstore
    > >
    > > Files are, static in kingston upon thames is kingston tn code.mdb
    > >
    > > The files which move about in my batch file is kingston data.mdb
    > >
    > > The batch file starts with an alternate version of the latter in eye, and
    > > the normal version in kingston upon thames.
    > >
    > > What is supposed to occur is the standard version is copied to the ktstore
    > > folder, then the copy of the non standard data is copied over the
    > standard
    > > one in kingston upon thames.
    > >
    > > Then the database is run and you should then see the non standard data.
    > >
    > > On exit, the non standard data goes to Eye, and the standard file is
    > copied
    > > back to Kingston upon thames again, thus preserving the main data file.
    > The
    > > batch file thus should allow two versions of the database to be accessed
    > by
    > > a fixed code file via Access.
    > >
    > > Well, what in fact occurs, despite the on screen text claiming all the 1
    > > file copied status, is that the file actually opened in the database is
    > > still the old data file with the standard data.
    > >
    > > I'm confused.. some would say it serves me right, but what am I doing
    > wrong
    > > here?
    > >
    > > Brian
    > >
    > >
    > >
    > > --
    > >
    > > Brian Gaff....Note, this account does not accept Bcc: email.
    > > graphics are great, but the blind can't hear them
    > > Email: briang1@blueyonder.co.uk
    > >
    > ____________________________________________________________________________
    > __________________________________
    > >
    > >
    > >
    >
    >
    >
Ask a new question

Read More

Kingston CD-Rom Windows