List of all files on the PC -> to a file .. on Windows
Today at work I have been wondering if you knew a program to generate a full list of folders and files that have a CD, and they want to store this list in a database to know where or know X file that contains a CD determined.
Thinking and knowing a bit odd console command because I asked if it would not be possible to generate such a list without installing a third party program. The answer is yes, if you can and now let's see how:
Code and example after the jump ->
In Windows you access to the console:
Start -> Run and type cmd and give it to OK.
Or:
Start button + R and type cmd and give it to OK.
Once in the console if you want to see the command help to know which system has the type:
c:\> help/?
It is a command in Windows called tree that will generate a directory tree, this command also has a number of parameters that allow us to add features such as the / F and / A.
The / F also shows the directories containing files, the / A bound to use ASCII instead of extended characters.
If you also want to keep what we generate on the screen to a file we will use "> filename". Uniendo todo nos quedaría de esta forma: Uniting all we stay this way:
c:\> tree /f /a > listado.txt
If we execute this command will generate a file that will contain a complete listing of all folders and files on the hard drive C.
I hope you serve as a utility.
Greetings.