On my PC, I want to index the names of files and folders in a particular location (say the files or folders at "D:\Backups\"), to a text file or any format. Which application should help me do it? I don't have any the name of a program which does this, or is there a Windows function for it?
spiroysterwrote on 2022-01-09, 10:53:You can use dir command and pipe the output to a file.
Open command prompt, navigate to any dir, then type... […] Show full quote
You can use dir command and pipe the output to a file.
Open command prompt, navigate to any dir, then type...
1dir /b /s > filelist.txt
To get a list of all files, dirs and subdirs (and files) in a text file called filelist.txt.
Either of them worked fine, thanks. But is there a way, I can remove the full path and keep the file and folder's indexing.
For eg: I want "Folder X\xyz.txt" instead of "D:\Backups\Folder X\xyz.txt"
For powershell you can use the relative path parameter
1Resolve-Path -Relative
Not possible for doing this with a dir command afaik, so you would need to write a batch script which removes that portion of the filepath from your results to make it relative.
For any topic that has to do with cataloging files of any kind, I use "Cathy" , it's free, you can find it on this page. http://rva.mtg.sk/
The last use I have given it was to catalog the hard drives of my NAS computers, I have three, and I don't feel like having them on all day, so if I need something, with the search function of this program I know what computer it is on and on which hard drive.
At work, we use it to catalog the hard drives with the backup images of the customer's computers, easier than searching among a lot of hard drives one by one for the image for the specific computer of a specific customer.
You could try if it works for you.
Is there a 64-bit version of EDLIN? In the old days you would use that to automatically edit text files by piping commands to it. There were fancy search-and-replace batch files that used it to do things like this. All this old knowledge has been lost.
ETA: I made a similar batch file many years ago. This is the important bit:
brep.exe is a third party program that does this. Here it removes the "C:" drive name from the list of file paths. I don't know if there's a way of doing this using just DOS tools.
ETA2: DEBUG is another tool that is missing from modern Windows. (Does Windows 10 32-bit have it?) Again, in the old days you could use this for simple automatic editing of binary files from within batch files by piping commands to it.
Last edited by Errius on 2022-01-24, 21:17. Edited 2 times in total.
Is there a 64-bit version of EDLIN? In the old days you would use that to automatically edit text files by piping commands to it. There were fancy search-and-replace batch files that used it to do things like this. All this old knowledge has been lost.
Replaced by edit... can't imagine the reasoning behind that decision.
Edit: yes, I can, but I don't agree 😁 Both are needed, imo.
Last edited by Snover on 2022-06-23, 16:34. Edited 2 times in total.