Results 1 to 5 of 5

Thread: BAT file help

  1. #1
    SG Stud ColdFusion's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, BC
    Posts
    3,542

    BAT file help

    hello,

    I need to make a simple bat file that simply checks if there is some sort of media in drive E:, if there is not it echos "Please insert media into drive E:\".

    Thats it
    Thanks for your help

  2. #2
    Elite Member Norm's Avatar
    Join Date
    Mar 2001
    Posts
    14,133
    @echo off
    :start
    dir E:>nul
    if %errorlevel%==1 goto nodisk
    exit
    :nodisk
    ECHO Please Insert Disk Into Drive E
    pause
    goto start


    If there is a disk in drive E: the program will exit.
    If there no disk in drive E: the program will loop until there is.
    Last edited by Norm; 12-24-04 at 12:26 PM.

  3. #3
    SG Stud ColdFusion's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, BC
    Posts
    3,542
    Thank you very much Norm

  4. #4
    Elite Member Norm's Avatar
    Join Date
    Mar 2001
    Posts
    14,133


    I take it that's what you needed?

    You can edit to suit your needs.
    Instead of using "exit", you could start a program from the CD if you wish.

  5. #5
    SG Stud ColdFusion's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, BC
    Posts
    3,542
    Quote Originally Posted by Norm


    I take it that's what you needed?

    You can edit to suit your needs.
    Instead of using "exit", you could start a program from the CD if you wish.
    Yes it was! Exactly what I needed. Yeah i have more of a script that i replace the 'exit' with. I was just totally stuck on how to halt if there was no media in drive E:.

    Thankyou again

Similar Threads

  1. How to configure IE file handling
    By GarroteYou in forum General Discussion Board
    Replies: 2
    Last Post: 10-09-03, 05:26 PM
  2. Fake file... virus?
    By Simulate030 in forum Network Security
    Replies: 2
    Last Post: 04-01-03, 03:19 PM
  3. Softwares ?
    By tothing in forum Software Forum
    Replies: 9
    Last Post: 03-09-03, 06:32 PM
  4. File sharing problem
    By jz in forum General Discussion Board
    Replies: 4
    Last Post: 12-06-01, 11:40 PM
  5. Outlook 2002 Backup
    By Tuz76 in forum Software Forum
    Replies: 2
    Last Post: 12-05-01, 09:27 AM

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
  •