Построить дерево диска для windows

In my work, i needed to generate a folders structure to help the team to organize the work data, but i found that i have to create more than 1500 nested folders, and that’s hard to do manually so i tried to search for a solution on the internet for my situation but without any results so i developed my own tool to do the task, i developed Directory Tree Generator.

Directory Tree Generator

Directory Tree Generator (DirGen) is a small tool based on .Net-framework 4 that helps administrators to build any Directory Structure they want without any effort and with organized way.

Directory Tree Generator Functions

DirGen provide various functions to help the administrator accomplish his objective:

  • Read Excel-Sheets and Extract the Folder Structure Tree.
  • Generate and modify Directory Structure Tree in Run-time.
  • Generate the Directory Structure Tree in Text File.
  • Execute The Directory Structure Tree on The Windows File System.
  • Export Directory Structure Tree to Excel Format.
  • Support Command Line Parameters for Scripting.

Directory Tree Generator Screenshots

Directory Tree Generator

How to Use Directory Tree Generator Using GUI

First, construct the Directory Structure Tree. You can construct it using DirGen manually with the GUI or using Excel-Sheet Template then import the Excel-Sheet in the DirGen to construct your Directory Structure Tree automatically.

Import Directory Structure Tree from Excel-sheet

  1. Use The Included Template in The DirGen Folder to Build Your Directory Structure Tree. The Template Consists of One Sheet for Folder Structure, Which hold Directory Structure Tree.
  2. Import The Template in DirGen using Import from Excel Button.
  3. After Importing the Excel-sheet you can update its content at Run-time before Executing Tree Text or View Tree Text
  4. To View the Generate Tree Text Press View Tree Text Button.
  5. To Execute the Directory Tree Select the Destination then Press Execute Tree Text Button.

How to Use Directory Tree Generator Using Command Line

DirGen support Command Line Operations, and this interface can help the administrator to use DirGen in the scripts.

Command Line Formats

DirGen.exe –o "<output path>" –i "<input excel file path>" [-s]
DirGen.exe –e "<root directory path>" –i "<input excel file path>" [-s]
Flag Description Mandatory/Optional
-o Output Path For The Text File Which Hold The Directory Tree Mandatory
-e Execute The Directory Tree in The Root Directory Path Mandatory
-i Input Excel-Sheet Path Which Hold The Directory Tree Mandatory
-s Run in Silent Mode [No Notifications or Messages] Optional

Command Line Examples

This line will generate Text File hold the Directory Tree in Text Mode and This Operation will work in Silent Mode.

DirGen.exe –o "c:\text_sample.txt" –i "d:\excel_sample.xlsx" –s

This line will generate The Directory Tree in The Windows File System in The Destination Folder.

DirGen.exe –e "c:\testFolder" –i " d:\excel_sample.xlsx"

Download

  • Download Directory Tree Generator (Version 0.3.3)
  • Download Directory Tree Generator (Version 0.3.2)

Feedback

Feel free to send me your feedback, ideas or requests for this small app to improve it and make it a useful administrative tool

 Category: Administration, Utilities      Tags: CLI, Command Line, command line parameters, Directory, DirGen, Excel, excel sheet, Export, File System, Folder, folders, Generator, Import, import directory, path program, Structure, structure tree, Text, tree generator

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.

Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.

Get Started Now!

The “tree” command is a Windows command-line tool that displays the directory structure of a specified path or drive in a tree format. Here are the options available for the “tree” command:

Usage: tree [drive:][path] [/F] [/A] [/Q] [/R] [/T] [/X] [/K]

Options:

  • [drive:][path]: Specifies the drive and directory to display the tree structure of. If no path is specified, the current directory is used.
  • /F: Displays the names of the files in each folder.
  • /A: Uses ASCII instead of extended characters.
  • /Q: Encloses directory names in double quotation marks.
  • /R: Displays the tree structure in a reverse order.
  • /T: Displays the tree structure with the file sizes.
  • /X: Prints the short names of files and directories.
  • /K: Displays the sizes of folders in kilobytes.

For example, to display the directory tree of the C:\Windows folder with file names and sizes, you would use the following command:

For example, to display the directory tree of the C:\Windows folder with file names and sizes, you would use the following command:

tree C:\Windows /F /T
This would display a tree structure of the C:\Windows folder with file names and sizes. The "/F" option displays the names of files, and the "/T" option displays file sizes.

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

  • DevOps Certification — Learn the fundamentals and advanced concepts of DevOps practices and tools.
  • DevSecOps Certification — Master the integration of security within the DevOps workflow.
  • SRE Certification — Gain expertise in Site Reliability Engineering and ensure reliability at scale.
  • MLOps Certification — Dive into Machine Learning Operations and streamline ML workflows.
  • AiOps Certification — Discover AI-driven operations management for next-gen IT environments.

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

Windows Visual Directory Tree Generator

Description

The Windows Visual Directory Tree Generator is a Windows Batch Script (.bat) designed to create a visual representation of a directory tree structure. It scans the given directory and its subdirectories to list files and folders, skipping specified folders if needed.

Features

  • Count the total number of folders and files.
  • Output the directory structure in a tree-like format.
  • Exclude specific folders from the scan.
  • Generate a text file (visual_directory_structure.txt) containing the directory tree structure and the summary.

How to Use

  1. Download the Script: Download the Windows Visual Directory Tree Generator.bat script and place it in any directory.

  2. Run the Script: Double-click the .bat file to run it, or run it from the command prompt.

  3. Enter the Directory: You will be prompted to enter the directory you would like to scan. Provide the absolute path of the directory.

    Enter the directory you would like to scan: C:\Users\YourUsername\Documents
  4. Enter Folders to Exclude: Next, you will be asked to provide a comma-separated list of folder names to exclude from the scan (no spaces between commas and folder names).

    (Optional) Enter comma-separated folder names to exclude (no spaces): folder1,folder2
  5. Check the Output: Once the script finishes running, it will create a file called visual_directory_structure.txt in the same directory where the script is located. This file contains the directory structure and summary details.

Output Format

The output file will have the following sections:

  1. Header: Information about the script and when the directory structure was generated.

    ==========================================================
    Windows Visual Directory Tree Generator
    ==========================================================
    Directory structure generated on Fri 09/04/2023 10:00:00.00
    Total number of folders: 10
    Total number of files: 50
    ==========================================================
    
  2. Directory Structure: A tree-like structure representing the directory and subdirectories.

    ├── apache-maven-3.9.3 
    │   ├── LICENSE 
    │   ├── NOTICE 
    │   ├── README.txt 
    │   ├── bin 
    │   │   ├── m2.conf 
    │   │   ├── mvn 
    │   │   ├── mvn.cmd 
    │   │   ├── mvnDebug 
    │   │   ├── mvnDebug.cmd 
    │   │   ├── mvnyjp 
    │   ├── boot 
    │   │   ├── plexus-classworlds-2.7.0.jar 
    │   │   ├── plexus-classworlds.license 
    │   ├── conf 
    │   │   ├── settings.xml 
    │   │   ├── toolchains.xml 
    │   │   ├── logging 
    │   │   │   ├── simplelogger.properties 
    │   ├── lib 
    │   │   ├── aopalliance-1.0.jar 
    │   │   ├── aopalliance.license 
    │   │   ├── commons-cli-1.5.0.jar 
    │   │   ├── commons-cli.license 
    │   │   ├── commons-codec-1.11.jar 
    │   │   ├── commons-codec.license 
    │   │   ├── commons-lang3-3.12.0.jar 
    │   │   ├── commons-lang3.license 
    │   │   ├── failureaccess-1.0.1.jar 
    │   │   ├── failureaccess.license 
    │   │   ├── guava-31.1-jre.jar 
    │   │   ├── guava.license 
    │   │   ├── guice-5.1.0.jar 
    │   │   ├── guice.license 
    │   │   ├── httpclient-4.5.14.jar 
    │   │   ├── httpclient.license 
    │   │   ├── httpcore-4.4.16.jar 
    │   │   ├── httpcore.license 
    │   │   ├── jansi-2.4.0.jar 
    │   │   ├── jansi.license 
    │   │   ├── javax.annotation-api-1.3.2.jar 
    │   │   ├── javax.annotation-api.license 
    │   │   ├── javax.inject-1.jar 
    │   │   ├── javax.inject.license 
    │   │   ├── jcl-over-slf4j-1.7.36.jar 
    │   │   ├── jcl-over-slf4j.license 
    │   │   ├── maven-artifact-3.9.3.jar 
    │   │   ├── maven-builder-support-3.9.3.jar 
    │   │   ├── maven-compat-3.9.3.jar 
    │   │   ├── maven-core-3.9.3.jar 
    │   │   ├── maven-embedder-3.9.3.jar 
    │   │   ├── maven-model-3.9.3.jar 
    │   │   ├── maven-model-builder-3.9.3.jar 
    │   │   ├── maven-plugin-api-3.9.3.jar 
    │   │   ├── maven-repository-metadata-3.9.3.jar 
    │   │   ├── maven-resolver-api-1.9.13.jar 
    │   │   ├── maven-resolver-connector-basic-1.9.13.jar 
    │   │   ├── maven-resolver-impl-1.9.13.jar 
    │   │   ├── maven-resolver-named-locks-1.9.13.jar 
    │   │   ├── maven-resolver-provider-3.9.3.jar 
    │   │   ├── maven-resolver-spi-1.9.13.jar 
    │   │   ├── maven-resolver-transport-file-1.9.13.jar 
    │   │   ├── maven-resolver-transport-http-1.9.13.jar 
    │   │   ├── maven-resolver-transport-wagon-1.9.13.jar 
    │   │   ├── maven-resolver-util-1.9.13.jar 
    │   │   ├── maven-settings-3.9.3.jar 
    │   │   ├── maven-settings-builder-3.9.3.jar 
    │   │   ├── maven-shared-utils-3.3.4.jar 
    │   │   ├── maven-slf4j-provider-3.9.3.jar 
    │   │   ├── org.eclipse.sisu.inject-0.3.5.jar 
    │   │   ├── org.eclipse.sisu.inject.license 
    │   │   ├── org.eclipse.sisu.plexus-0.3.5.jar 
    │   │   ├── org.eclipse.sisu.plexus.license 
    │   │   ├── plexus-cipher-2.0.jar 
    │   │   ├── plexus-cipher.license 
    │   │   ├── plexus-component-annotations-2.1.0.jar 
    │   │   ├── plexus-component-annotations.license 
    │   │   ├── plexus-interpolation-1.26.jar 
    │   │   ├── plexus-interpolation.license 
    │   │   ├── plexus-sec-dispatcher-2.0.jar 
    │   │   ├── plexus-sec-dispatcher.license 
    │   │   ├── plexus-utils-3.5.1.jar 
    │   │   ├── plexus-utils.license 
    │   │   ├── slf4j-api-1.7.36.jar 
    │   │   ├── slf4j-api.license 
    │   │   ├── wagon-file-3.5.3.jar 
    │   │   ├── wagon-http-3.5.3.jar 
    │   │   ├── wagon-http-shared-3.5.3.jar 
    │   │   ├── wagon-provider-api-3.5.3.jar 
    │   │   ├── ext 
    │   │   │   ├── README.txt 
    │   │   │   ├── hazelcast 
    │   │   │   │   ├── README.txt 
    │   │   │   ├── redisson 
    │   │   │   │   ├── README.txt 
    │   │   ├── jansi-native 
    │   │   │   ├── README.txt 
    │   │   │   ├── Windows 
    │   │   │   │   ├── x86 
    │   │   │   │   │   ├── jansi.dll 
    │   │   │   │   ├── x86_64 
    │   │   │   │   │   ├── jansi.dll 
    

Requirements

  • Windows operating system
  • Command Prompt

Limitations

  • The script doesn’t handle file/folder names with special characters effectively.
  • Limited to the performance and capabilities of a Windows Batch Script.

License

This project is licensed under the MIT License — see the LICENSE file for details.

Author

  • Bernard Visagie

Acknowledgments

  • 🛠️ Special thanks to ChatGPT for helping with the script. 😉

TreeSize — полезная портативная утилита, которая поможет вам сориентироваться и понять, чем же заполнено дисковое пространство компьютера. Со течением времени свободного места на ПК становится все меньше и меньше, и сразу сложно оценить, какие файлы и директории «весят» больше всего. Это приложение сканирует жесткие диски компьютера и выстраивает дерево папок, отсортированных по занимаемому объему пространства.

Работать с программой TreeSize очень просто: каких-то особый опций тут не предусмотрено, а интерфейс лаконичен и интуитивно понятен. От вас требуется только указать диск (или конкретную папку) для анализа и дождаться его окончания. Стоит отметить, что этот инструмент поддерживает полную структуру вложенных директорий, т.е. когда построение дерева закончено, можно перейти в любую папку и посмотреть из чего она состоит.

Для удобства, информация о размере папок может быть выражена как в процентном соотношении, так и абсолютных величинах — все в Kб, Mб, Гб или автоматическое преобразование величины в наиболее подходящее. Также дерево можно сортировать не только по размеру папок, но и по наименованию директорий, что иногда бывает необходимым.

В целом, TreeSize достаточно хорошая информативная программа, с которой вы точно будете знать что и где находится на дисках компьютера.

Время чтения 3 мин.Опубликовано

Оглядываясь назад, первые разработчики компьютеров поняли, что объединение нескольких файлов в ваших компьютерных системах создаст огромный мусор и сделает невозможным поиск чего-либо. Следовательно, был создан ‘Directory’ в системах Windows. Каталог, система каталогов, структура каталогов и дерево каталогов — это множество имен для одного и того же.

Простыми словами, структура каталогов (или система, или дерево) — это простое расположение каталогов в компьютерной системе. Все мы уже много лет слышим о структурах каталогов и деревьях папок. Давайте начнем использовать его сегодня, поскольку это может значительно улучшить рабочий процесс вашей организации. Теперь экспортировать все дерево каталогов из определенной папки в Windows 11 или Windows 10 легко. Но простого способа создания дерева папок в Windows 11/10 не существует.

Проводник помогает быстро просматривать или открывать файлы в системе Windows 10. Пользователи могут перемещаться по каталогам, используя меню назад, вперед, вверх, навигационные меню, непосредственно вводя местоположение в адресной строке и прокручивая левую или правую панели.

Но проводник Windows не позволяет вам понять всю структуру каталога. Если вы потратили абсурдное количество времени на прокрутку сотен файлов, пытаясь найти нужный, то дерево папок может иметь значение. Мы уже упоминали, что нет прямого способа просмотра папок / файлов в формате дерева в проводнике Windows. Здесь могла бы сработать ‘Команда дерева’.

tree Команда может очень упростить отслеживание файлов и папок с помощью командной строки. Вы можете просмотреть, как структурирован каталог в вашей системе и где расположен каждый файл. Давайте посмотрим, как это сделать.

1] Нажмите клавиши Win + E, чтобы открыть проводник и перейти к целевой папке с файлами, для которой вы хотите создать дерево папок.

Пожалуйста, обратите внимание – в нашем случае мы выбрали C:\Drivers папку.

2] В адресной строке скопируйте и вставьте приведенную ниже команду:

CMD /c «Tree /F /A > test.xls»

Объяснение состава команды Tree – CMD /c “Tree /F / A > test.xls ”

  • ‘cmd /c– — используется для активации командной строки.
  • ‘Tree’ – название команды, которая генерирует структуру.
  • ‘/F’ – список вниз по списку всех файлов в каждой папке. При отсутствии этого параметра в списке были бы перечислены только папки.
  • ‘/A– — используется для экспорта результата в файл.
  • ‘> Test.xls’ – примерное имя и тип файла. В данном случае оно в формате Excel, но то же самое можно изменить на txt, doc, pdf, dat и т.д. чтобы создать дерево папок в желаемом формате.

3] Нажмите ‘Enter’.

Это создаст новое дерево папок с именем файла ‘Test’ в папке C:\Drivers.

Дважды щелкните по файлу, и вы сможете увидеть формат структурированного дерева всех файлов.

Дерево папок может быть создано для любой конкретной папки в Windows 10. Итак, если папка расположена в ‘F:\test’, то команду следует изменить на следующую команду:

cmd /c «дерево F:\test /f / a > Test.xls»
Эта простая команда дерева дает нам полное представление о каталоге в Windows 11/10. В кратчайшие сроки вы сможете создать дерево папок, которое не только обеспечит отличную организацию ваших файлов, но и будет держать ваши файлы Windows в пределах легкой досягаемости.

Обучаю основам работы с офисными программами.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Dash in band config for windows
  • Куда вставлять загрузочную флешку windows
  • Полное отключение onedrive windows 10
  • Как посмотреть версию драйвера видеокарты nvidia на windows 10
  • Winrar 64 bit windows 10 онлайн