Crates.io | dirby |
lib.rs | dirby |
version | 0.1.1 |
source | src |
created_at | 2024-10-29 08:26:16.383588 |
updated_at | 2024-10-29 08:36:14.028856 |
description | The Dirby command line tool for speedily creating large amounts of directories |
homepage | |
repository | https://github.com/GhostUponAvon/dirby |
max_upload_size | |
id | 1426755 |
size | 49,432 |
The Dirby command line tool for speedily creating large amounts of directories
Dirby is a Command line tool built with rust for creating large amounts of folders without out the need to do it by hand, create batch files, etc. Dirby does this by parsing a simple text file that specifies what directories to make and the child directories.
dirby [input file] [output directory]
. Where "[input file]" is the text file from earlier and "[output directory]" is the root folder to spawn all the directories inside (if the output directory doesn't exist it will be created).This section details what you are aloud to fill the input text file with.
To specify a directory, simple type its name:
my_directories.txt
my folder
To specify more directories at the same level just keep adding new lines with new names. But to make a sub-directory of another directory, add a slash before its name and position it one line under the parent directories name.
Here is a simple example:
my_directories.txt
my folder
/my child folder
Produces: [output_dir]/my folder/my child folder
Here is a more complex example:
my_directories.txt
foo
/bar
//baz
fizz
Produces: [output_dir]/foo/bar/baz
and [output_dir]/fizz
Rules
/
at the beginning of a line denotes a subdirectory; increasing directory depth by more than one at a time by adding more than one slash, will cause and error. See files that will cause an error.Dirby has been built with Linux, Windows, and MacOS in mind and should support them. Dirby has however not been tested on MacOS, so is not guaranteed to work as expected.
The following is some examples of files that cause errors because they do not follow the Syntax Rules.
LPT9
, this problem is windows specific and is caused because "LPT9" is one of many reserved windows file names.my folder
/my folder 2
LPT9
my folder 3
my folder
/my folder 2
///my folder 3
/
and the reason it causes an error is because it is located specifically in the directory name section of the line.my folder
my folder2/my folder 3
There will be a more detailed way to contribute in future, but for now please raise an issue in the issue tab if there is a bug or a feature you would like to request.