Click to See Complete Forum and Search --> : cmd commands


shock1
March 7th, 2004, 06:03 PM
when i start a command (also called DOS prompt) how can i know how many files have the word "disk" in them? What would be the commands for that? thanks.

CeeBee
March 8th, 2004, 08:26 AM
when i start a command (also called DOS prompt) how can i know how many files have the word "disk" in them? What would be the commands for that? thanks.
I don't think you can do it directly. It would be much easier to make a VB script to do it. However, you can generate a list of matching files with the following command:
for /r [optional_path] %i in (*disk*.*) do echo %i>>filelist.txt
If you are running it from a batch file rather from a command prompt replace %i with %%i

Zonie
March 8th, 2004, 08:56 AM
when i start a command (also called DOS prompt) how can i know how many files have the word "disk" in them? What would be the commands for that? thanks.

Type in "Dir *disk*.* /s /w" This will give you a listing of all files with disk in them. Cheers