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

Author Topic: Batch files  (Read 4504 times)

0 Members and 1 Guest are viewing this topic.

Anand

  • Guest
Batch files
« on: March 22, 2004, 07:41:17 AM »
how to locate a file using batch files.

eg:

c:\test\test1.txt
c:\test\test2.txt

i can get the file names and count using the dos command dir c:\test\test*.txt

But how can i get the same using the batch file.

Output:
I need the file names and number of the files present in a given folder

With Thanks and Regards,
Anand


Doomsday_J

  • Guest
Re: Batch files
« Reply #1 on: March 26, 2004, 11:03:06 AM »
Did you try typing that DIR command into your batch file?


@echo off
DIR c:\test\test1.txt
DIR c:\test\test2.txt

This will list the test1.txt and the test2.txt file

mims1979

  • Guest
Re: Batch files
« Reply #2 on: September 14, 2004, 02:50:00 PM »
Check http://www.dx21.com/SCRIPTING/MSDOS/INDEX.ASP

They've got a pretty good list of commands in dos that you can probably piece together to do what you need.

contrex

  • Guest
Re: Batch files
« Reply #3 on: July 03, 2007, 02:03:41 PM »
Brainiac, the oldest thread you've dragged back from the dead so far! What are you playing at???

ghostdog74



    Specialist

    Thanked: 27
    Re: Batch files
    « Reply #4 on: July 04, 2007, 01:18:37 AM »
    relax contrex, why get so agitated. if the next guy (and the next, and the next ) comes in and revive threads, are you going to do this all the time.? i think you have more important things to do, like helping solve problems, than be bothered with such minor things. so laugh it off, and enjoy a nice day.

    contrex

    • Guest
    Re: Batch files
    « Reply #5 on: July 04, 2007, 01:27:03 AM »
    I was bored, and I noticed all these unfamiliar threads...