It is very surprising that there is no better tool for it. I then printed out the file to console again and screen grabbed it.īefore screen grabbing I had to modify foreground color to black and background color to white, to look better and save ink in a document should that be printed. For example if a subfolder contained 20 similarly typed files that individually were not important to the point I was making, I left just two and replaced the rest with one. I both screen grabbed the result (for short folders) AND for longer folders I redirected to a text file, which I then edited.
I had to explan where files (in particular resources and configuration files) reside. The question was related to a documentation sub project. The tool may be commercial but preferably free. The tool must run on Windows, but preferably cross-platform.
For example, to display directories that are also hidden in blue:ĬOLORDIR processes the line from left to right, and does not support parentheses.Given a file tree - a directory with directories in it etc, how would you write a script to create a diagram of the file-tree as a graphic file that I can embed in a word processor document. You can combine attribute tests with the. BAC files in red, and everything else in the default color: Set colordir=EXETYPE_WIN32CUI:bri green EXETYPE_WIN64CUI:bri redĮxtended wildcards can be used in directory color specifications. To display 32-bit console apps in bright green and 64-bit console apps in bright red: Set colordir=exe:red c asm:bright cyan rdonly:green on white ASM files in bright cyan on the current background, read-only files in green on white, and everything else in the default color:
EXE files in red on the current background. If you don't specify a background color, DIR will use the current screen background color.įor example, to display. Unlike most color specifications, the background portion of the color name may be omitted for directory colors. xyz.hidden ), that file will receive the color defined for the file type. Note that if a file uses one of the reserved file type names shown above as its extension (e.g. Specifying a subsystem type will significantly slow down the directory display, as TCC has to read the header of each file to find a match. Where "ext" is either a file extension (which may include wildcards), one or more of the following file types:Īnd "ColorName" is any valid color name (see Colors and Color Names for information on color names).
The format for both the COLORDIR environment variable and the Directory Colors option is: You may find it useful to use the COLORDIR variable for experimenting, then to set permanent directory colors with the Directory Colors option. If you use the COLORDIR variable, it will override the Directory Colors option. If you use neither the variable nor the configuration option, DIR will use the default screen colors for all files. To choose the display colors, you must either use the SET command to create an environment variable called COLORDIR, or use the Directory Colors configuration option. TREE can display each file name and the associated file information in a different color, depending on the file's extension, attributes, or matching range. The options discussed below specify the amount of information included in the display. Be sure to review the /A option before attempting to print the TREE output. You can print the display, save it in a file, or view it with LIST by using standard redirection symbols. To correct the problem, use /A, or configure the TCC to use a font which can display standard extended ASCII characters. If your system is configured for a different country or language, or if you use a font which does not include these line drawing characters, the connecting lines in the tree display may not appear correctly (or not appear at all) on your screen. TREE uses the standard line drawing characters in the U.S. For example, to display the directory structure on drive C: The TREE command displays a graphical representation of the directory tree using standard or extended ASCII characters. The default filename completion syntax is: dirs Supports command dialog, attribute switches, extended wildcards, ranges (with /F), and multiple file names.