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

Author Topic: Batch File Need Help  (Read 3303 times)

0 Members and 1 Guest are viewing this topic.

myusri

    Topic Starter


    Rookie

    Batch File Need Help
    « on: March 12, 2009, 04:56:51 AM »
    I have create this batch file:

    @echo off
    REM Print the welcome message
    echo Hello, Welcome to MS-DOS batch file For question 2aii

    REM pause the screen
    pause

    REM clear the screen
    cls

    REM notify to list the current folder list
    echo Listing all text files in current directory...


    REM Listing the content of the current directory
    dir *.txt/a/ogn

    REM Delete all the text file
    del *.txt

    REM To check if txt file exit or not

    if exist patuh.txt del patuh.txt

    pause


    Actually I want this progam to:
    -Display all file and subdirectories including hidden files in the floopy disk
    -Then the program will delete all text files in floppy disk before clear the screen
    -After that prog will check whether the any text files exist or not in current directory, if exist all the text files copy to floopy disk, else change the colour of  the screen background and foreground to red or yellow

    Quit tricky but i m still  no idea to continue the prog. Anyone can help plz?

    Dias de verano

    • Guest
    Re: Batch File Need Help
    « Reply #1 on: March 12, 2009, 05:17:42 AM »
    homework?

    myusri

      Topic Starter


      Rookie

      Re: Batch File Need Help
      « Reply #2 on: March 12, 2009, 05:26:38 AM »
      a quiz from my friend to beat me. Well i new here
      But im still keep  to find solution here
      Anyone can help me?

      Dias de verano

      • Guest
      Re: Batch File Need Help
      « Reply #3 on: March 12, 2009, 05:33:33 AM »
      type DIR /? to find out all you need to know.


      myusri

        Topic Starter


        Rookie

        Re: Batch File Need Help
        « Reply #4 on: March 12, 2009, 06:04:08 AM »
        type DIR /? to find out all you need to know.

        command dir/? is to list all files and subdirectories icluding hidden files?? Is it?

        macdad-



          Expert

          Thanked: 40
          Re: Batch File Need Help
          « Reply #5 on: March 12, 2009, 06:10:24 AM »
          he means find out yourself, no homeworking helping...

          DIR /?
          lists all the switches and parameters for DIR.
          If you dont know DOS, you dont know Windows...

          Thats why Bill Gates created the Windows NT Family.

          myusri

            Topic Starter


            Rookie

            Re: Batch File Need Help
            « Reply #6 on: March 12, 2009, 06:28:29 AM »
            this is forum ... so i'm please to get the info or clue from all of you here. Dont get me wrong. But im still hope to find the solution from the expert outhere. Can expert help me?

            Dias de verano

            • Guest
            Re: Batch File Need Help
            « Reply #7 on: March 12, 2009, 06:32:13 AM »
            this is forum ... so i'm please to get the info or clue from all of you here. Dont get me wrong. But im still hope to find the solution from the expert outhere. Can expert help me?

            Expert already did. Read the posts.

            Carbon Dudeoxide

            • Global Moderator

            • Mastermind
            • Thanked: 169
              • Yes
              • Yes
              • Yes
            • Certifications: List
            • Experience: Guru
            • OS: Mac OS
            Re: Batch File Need Help
            « Reply #8 on: March 12, 2009, 07:59:13 AM »
            Have you gone to Command Prompt and typed 'dir /?' yet?

            myusri

              Topic Starter


              Rookie

              Re: Batch File Need Help
              « Reply #9 on: March 12, 2009, 10:02:56 PM »
              yup i already done dir /?


              Dias de verano

              • Guest
              Re: Batch File Need Help
              « Reply #10 on: March 13, 2009, 01:16:48 AM »
              yup i already done dir /?



              And what did you learn?