0
I need a list of all files and folders in a giant directory. This ends up being approximately 1000 folders and 20000 files.
Being a command line noob, I started out just by doing "dir>file.txt" while cd-ed to each individual folder.
Now im trying to just do this by using "dir /s>file.txt" on the top level directory.
It looks like the command works properly, and the file gets created, the issue is that the .txt file contains only 19 of the 107 top level directories.
Anyone have any ideas on why the command is crapping out less than a fifth of the way in? Is there some kind of max number of values returned for the command or something?
I rarely use CMD, preferring the free
– AFH – 2015-08-03T21:18:48.043TCC/LE
from JP Software, and I've never had a problem such as you describe. Maybe you have some very long path lengths in your directory tree, causing a buffer overflow inCMD
.I added the comment about your tag after I had given you relevant information: are you ignoring that? Either of the commands in Keltari's answer will show if you have very long paths. – AFH – 2015-08-03T21:31:17.217
So, with the two of you together, I can use tree, I can use powershell using get-childitem -recurse. I install JP Software so that I could use TCC/LE.
I am pretty sure I could use perl or java. I'm pretty sure I could switch over to linux. I'm pretty sure I could develop a custom application.
None of this tells me the constraints of dir, or how to fix my dir command.
It's like a person asking about repairing the chain on their bicycle and being told how plasma cutters work wonders at clearing debris in jet engines. – user2989297 – 2015-08-03T22:02:42.757
Sorry, just seems like a simple issue that I'm very close to a solution on, and I've been told I'm in the wrong stack exchange forum, I've gotten a bunch of edits to my question, I've been told about all sorts of different development tools but noone who has spoken up knows about what I'm asking, the dir command in the command line. – user2989297 – 2015-08-03T22:04:20.827
I know precisely what you're asking, and I have suggested a reason for your problem and a work-round. If you want the software to work correctly, raise the matter with Microsoft - it's their software. Good luck. – AFH – 2015-08-04T00:01:07.800
I see no reason to delete this; there is an upvoted answer, and there was only one edit changing the tags. – slhck – 2015-08-04T12:32:57.820