I know these two amazing websites to do that easily: Download Directory and DownGit.
The problem is that they both work recursively, so if I for example give this link: it will also download the subdirectories, which is not ideal in my case, since there are A LOT of files.
Is there a tool or website to just download a directory without its subdirectories?
I know these two amazing websites to do that easily: Download Directory and DownGit.
The problem is that they both work recursively, so if I for example give this link: https://github/danielmiessler/SecLists/tree/master/Passwords it will also download the subdirectories, which is not ideal in my case, since there are A LOT of files.
Is there a tool or website to just download a directory without its subdirectories?
Share Improve this question edited Mar 30 at 8:29 dani-vta 7,5007 gold badges49 silver badges65 bronze badges asked Mar 30 at 8:05 allexjallexj 1274 bronze badges 3- 1 So you want to download the files in /Passwords, but not in /Passwords/Books etc? – Martheen Commented Mar 30 at 8:13
- exactly that's what I want – allexj Commented Mar 30 at 8:17
- @allexj did my post answer your question or are you still having issues with it? – dani-vta Commented yesterday
1 Answer
Reset to default 2To download just a subset of a repository, you could perform a sparse
clone and then use the sparse-checkout
command.
The sparse clone will download only the top level directory of your repository, while sparse-checkout
will incrementally grow the working directory with just the content you're interested in.
# clone just the top level directory of your repo
git clone --sparse <URL> -- myrepo
# cd into the repo
cd myrepo/
# provide the subcommand set with a list of patterns to checkout,
# in your case just 'Passwords' without its subfolders
git sparse-checkout set --no-cone Passwords '!Passwords/*/**'