Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is this possible to write list of file names into a text file using batch file Windows Xp?

Tags:

batch-file

cmd

I want to write the list of file names from a Given directory path in to text file whenever clicking a windows XP batch file.I don't know whether it is possible or not in Windows Xp?

So,Can u please enlighten me on this?

like image 895
Saravanan Avatar asked Dec 23 '11 04:12

Saravanan


People also ask

How do you write a batch file to text?

Click File and then Save, and then navigate to where you want to save the file. For the file name, type test. bat and if your version of Windows has a Save as type option, choose All files, otherwise it saves as a text file. Once you have completed these steps, click the Save button and exit notepad.


1 Answers

How about something like this?

dir /b "C:\My Path" > myFiles.txt
like image 153
ziesemer Avatar answered Oct 11 '22 15:10

ziesemer