Questions tagged [directory-tree]
42 questions
605
votes
21 answers
Directory-tree listing in Python
How do I get a list of all files (and directories) in a given directory in Python?

Matt
- 84,419
- 25
- 57
- 67
9
votes
3 answers
Representing a directory tree as a recursive list
I am stuck with a certain task. What I want is a function that, given a directory path, would return a recursive-list as an output.
The output should be of the form myList$dir$subdir$subdir$fullFilePath
So basically I want to represent a directory…

Karolis Koncevičius
- 9,417
- 9
- 56
- 89
9
votes
5 answers
How can I search my directory tree for contents within a file for a git managed project?
I like the unix find command but I always find it too 'fiddly' to use when I want to search through my project looking for a piece of text in any file in any directory or subdirectory.
Is there an easier way to do this?

Michael Durrant
- 93,410
- 97
- 333
- 497
8
votes
1 answer
Netlify option to show directory contents
I need to list contents of my site directory on Netlify for debug, but I can not find an option to turn on directory listings. Am I right that there is no such autoindex ability in Netlify as mod_autoindex provides for Apache?
UPDATE: I tried…

anatoly techtonik
- 19,847
- 9
- 124
- 140
4
votes
2 answers
Emacs dirtree - Directory tree view setup
I am very new to emacs, I am trying to get a directory tree. I have followed another StackOverFlow Emacs dirtree question and my .emacs and .emacs-d are as follows:
.emacs
;; line number plugin
(add-to-list 'load-path'…

user1152142
- 889
- 3
- 12
- 18
3
votes
2 answers
in bash find all files in flat directory that don't exist in another directory tree
I have many files in a directory A.
Some of those files exist in a directory tree with sub-directories B/B1, B/B2, B/B3, B/B4, ...
Note that some files have spaces in their names.
For example:
in directory A:
there's a file named A/red…

martin jakubik
- 4,168
- 5
- 29
- 42
2
votes
0 answers
Building a python script to create a tree of directory structure of SharePoint Document Library
Objective: To build a python script which will download all the files from a SharePoint Document Library and store in the same folder structure (including subfolders till the N-th)
Using: Python 3.6 and a great SharePoint REST API tool by @Vadim…

Aakash Basu
- 1,689
- 7
- 28
- 57
2
votes
2 answers
Watching a directory tree without inotify
I'm trying to write a backup utility that is supposed to handle a rough 2 terabytes of data in a lot of folders.
I want it to perform actions on files when they get created/edited/deleted preferably also file moves or renames.
I've messed around…

blipman17
- 523
- 3
- 23
2
votes
1 answer
Execute script once before installing a directory tree
I am trying to write an Inno Setup installer to install and then run other installers. The problem I have is when trying to install Cygwin. I have downloaded Cygwin and all packages I need so I can perform a local install. Then I want to add extra…

johno999
- 23
- 3
1
vote
1 answer
Get directory structure from FTP using PHP
I have ftp server with a lot of subfolders and files in it. I need to retrieve the folder structure from ftp, which shows names of all folders and subfolders from a specified starting path. I'm not interested in files included in each folder, only…

user2963789
- 115
- 2
- 10
1
vote
1 answer
How can I create directory tree in C?
I want an easy way to create multiple directories in C.
For example I want to create directory in:
/a/b/c
but if the directories are not there I want them to be created automagically. How can I do this ?

mcora
- 43
- 5
1
vote
0 answers
Lazy iterator over files in directory structure
There are related questions, but none of them addresses the "lazy" part, that is, discover more content only as the iteration progresses.
See How do I iterate through the files in a directory in Java?
Also Apache Commons FileUtils.iterateFiles()…

joopRksn
- 11
- 2
1
vote
1 answer
How to determine whether files have been changed in a directory tree without traversing the entire tree?
Imagine a directory tree (on Linux):
user@computer:~/demo> find…

s-m-e
- 3,433
- 2
- 34
- 71
1
vote
2 answers
Python: Unzip selected files in directory tree
I have the following directory, in the parent dir there are several folders lets say ABCD and within each folder many zips with names as displayed and the letter of the parent folder included in the name along with other…

balalaika
- 904
- 4
- 10
- 17
1
vote
1 answer
Mapping Network Drive Node js
I'm new to node and I'm trying to get a list of files in a network drive using the directory-tree plugin but I'm getting a null return. Has anyone had this problem
var dirTree = require('directory-tree');
var tree =…

Jhamar S.
- 71
- 2
- 7