Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: batch file "pause" question

  1. #1
    Variable Bitrate
    Join Date
    Apr 2000
    Location
    Little Rock, Arkansas
    Posts
    321

    batch file "pause" question

    Right now I have my windows booting with shell=c:\startup.bat

    In that batch file I copy my playlist to my winamp directory and then load the specific playlist. I also check to see if my external hard drive is plugged up and if it is, it runs the autorun.bat process from it.

    Basically my questino is this, is there a way in a batch file to pause for a determined amount of time? Basically I want it to pause for say 1-2 seconds. The problem Im running into is that my startup sound "Welcome to the Grand aMP3 Project" is running just barely long enough that my music starts up behind it. Any ideas? Sorry to just badger on, its a saturday.
    The Grand aMP3 Project
    Car: 96 Pontiac Grand Am
    Current Setup: AMD K62 300MHz, 64MB DIMM RAM, 20GB WD Hard Drive, Basic Video & Sound

  2. #2
    Low Bitrate
    Join Date
    Dec 2002
    Location
    Florida
    Posts
    99
    Hi grandamp, just add the following line into your batch file where you want the pause to take place:

    choice /n /t:n,2

    The "2" is the number of seconds you want to wait. It can be any value from 0 to 99.

    This is assuming you're using either MS DOS or Win9x.

    Hope this helps.

    Dex

  3. #3
    Variable Bitrate
    Join Date
    Apr 2000
    Location
    Little Rock, Arkansas
    Posts
    321
    thanx dex, i hadnt even thought about anything like that, basically asking a choice but timing out after 2 seconds. I knew I could do that just didnt think about it. Anyway, thanx again.
    The Grand aMP3 Project
    Car: 96 Pontiac Grand Am
    Current Setup: AMD K62 300MHz, 64MB DIMM RAM, 20GB WD Hard Drive, Basic Video & Sound

  4. #4
    Low Bitrate
    Join Date
    Dec 2002
    Location
    Florida
    Posts
    99
    Your welcome.

  5. #5
    Low Bitrate
    Join Date
    Dec 2002
    Location
    Florida
    Posts
    99
    I just thought, this line works a bit better if done like this:

    choice /n /t:y,2>nul

    This simply prevents "echoing" the responce to the screen, and by using Y instead of N you generate an errorlevel 1, which I think, is better than leaving an errorlevel 2 hanging. May not be important, just a safeguard.

  6. #6
    Maximum Bitrate eugenen's Avatar
    Join Date
    May 2002
    Location
    Ohio
    Posts
    858
    The NT/2000 resource kit has a sleep command that works for that

  7. #7
    Variable Bitrate
    Join Date
    Apr 2002
    Location
    North Yorkshire, UK
    Posts
    352
    Since there are some DOS head's here, does anyone know how to create a directory, the name of which is the current date, without having to type in the date?
    Then include the name of this directory in the path of a "copy" command?

    I tried this a while back and gave up as I couldnt figure it out. Can anyone please help?

    Dave

  8. #8
    Variable Bitrate
    Join Date
    Apr 2000
    Location
    Little Rock, Arkansas
    Posts
    321
    the only way I would think to do that, and even this is a real stretch, is to echo the date out to a file (date.txt or something). Then you would have to somehow call the first line of that date.txt and use in the md function. I highly doubt this is at all possible but one can dream. If I were you, I would either learn some programming or have someone program a small program to do what you want.
    The Grand aMP3 Project
    Car: 96 Pontiac Grand Am
    Current Setup: AMD K62 300MHz, 64MB DIMM RAM, 20GB WD Hard Drive, Basic Video & Sound

  9. #9
    Low Bitrate
    Join Date
    Dec 2002
    Location
    Florida
    Posts
    99
    thenominous, I've seen this before but can't find it at the moment.

    However, its here somewhere:

    Batch File Links

    Its a lot of reading and research, but the answer is out there!

    If I find it first, I'll post it.

    Dex

  10. #10
    cj
    cj is offline
    Low Bitrate
    Join Date
    Aug 2001
    Posts
    57
    http://www.batch.hpg.ig.com.br/index.htm

    Specifically look at #2 and #5. There are also may additional routines you can play with.

    If NT/2K/XP is your bag, look here:

    http://www.jsiinc.com/reghack.htm

    A good all around site is below:

    http://www.robvanderwoude.com/index.html

    Have fun.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •