Computer Hope

Microsoft => Microsoft DOS => Topic started by: Armageddon on January 29, 2005, 06:08:14 AM

Title: make a filelist.txt from files in a folder
Post by: Armageddon on January 29, 2005, 06:08:14 AM
hi guys!

i've got a problem. i'm totally new in making batchfiles. i want to put the filenames of the files in a folder into a .txt file named maplist.txt. filenames are like arena.bsp but in the maplist.txt may not be the .bsp thingys. i said i'm totally new so i need help with that. it shall run on a winXP or win 2003 server.
Please help!!!  :'( :'( :'( ??? ??? ??? :'( :'( :'(

thanks a lot     Armageddon
Title: Re: make a filelist.txt from files in a folder
Post by: cs on January 31, 2005, 02:58:33 AM
Code: [Select]
@echo off
dir /b /a-d > maplist.txt

writes the files in the current directory to the file maplist.txt. Just write these two lines into a file with the extension .bat and execute this file.

Cheers,
[glb]cs[/glb]