Command “.dir” in ROOT v6 on W10?

Commands “with a dot” do not work in excess of those listed in the starting Root-welcome.
I tried versions v26.00.00, v24.xx.xx, and the version indicated on the forum for 64-bit W10.
The result is the same as on the added PrtScr. I added “by hands” path: root/lib and root/include for the corresponding variables. Classes work, but “moving” across the disk is not controlled.

Maybe someone knows met such a problem?
My system: W10, VS2019, 64-bit, AMD.

In principle, I continue to work with version 5.34.38, but I would like to see a new one.


The list of available “dot commands” is given by .help.
.dir does not show in the list.

Try with .!dir

  | Welcome to ROOT 6.27/01               |
  | (c) 1995-2022, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for win32 on Apr 07 2022, 09:17:04                         |
  | From heads/master@v6-25-02-976-ge505630f86                       |
  | With MSVC 19.29.30141.0                                          |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |

root [0] .!dir
 Volume in drive C is Windows
 Volume Serial Number is 66F0-149A

 Directory of C:\Users\bellenot\temp

31/03/2022  14:03    <DIR>          .
31/03/2022  14:03    <DIR>          ..
08/02/2017  13:50    <DIR>          appveyor
09/12/2016  12:52           108’032 bindexplib.exe
13/12/2016  14:47         5’074’250 cling.def
01/12/2016  16:49            85’755
20/05/2019  13:01    <DIR>          git
16/05/2019  13:52    <DIR>          github
07/12/2016  17:11             7’558 msvcrt_exp.def
30/11/2016  17:23           143’512 sync.exe
30/11/2016  17:23           158’360 sync64.exe
04/10/2021  10:34    <DIR>          test
07/12/2016  17:30             1’186 Warnings.txt
               7 File(s)      5’578’653 bytes
               6 Dir(s)  57’109’524’480 bytes free
root [1]

Thank you!

This helped for .dir in this combination (.!) . The .!dir-command also works outside of c:\root\bin (for example, like .!dir d:\ ) .

Still, there is a problem changing folders and/or the disk - .cd-command. Only c:\root\bin is kept all the time.
This can be seen in the attached PrtScr.

Thank you!

P.S. I just now realized that in “x86_Native…” I can only “move” in the c-disk limits, however, to any depth. And I can look the contents of other discs\folder\folder.
In this situation It would be enough to go to the internal folder in c:\root\bin\user

I will test this situation with c-disk of “x86_Native…” on other types MVS.

Thank you!

To change the current directory, use TSystem::cd() e.g.: gSystem->cd("d:\\")

EDIT: BTW, the system commands like dir and cd begin with a dot and exclamation mark .! see at the end of the help with the .help command:

root [0] .help

 Cling (C/C++ interpreter) meta commands usage
 All commands must be preceded by a '.', except
 for the evaluation statement { }
 Syntax: .Command [arg0 arg1 ... argN]

   .L <filename>                - Load the given file or library

   .(x|X) <filename>[(args)]    - Same as .L and runs a function with
                                  signature: ret_type filename(args)

   .> <filename>                - Redirect command to a given file
      '>' or '1>'               - Redirects the stdout stream only
      '2>'                      - Redirects the stderr stream only
      '&>' (or '2>&1')          - Redirects both stdout and stderr
      '>>'                      - Appends to the given file

   .undo [n]                    - Unloads the last 'n' inputs lines

   .U <filename>                - Unloads the given file

   .(I|include) [path]          - Shows all include paths. If a path is given,
                                  adds the path to the include paths.

   .O <level>                   - Sets the optimization level (0-3)
                                  If no level is given, prints the current setting.

   .class <name>                - Prints out class <name> in a CINT-like style (one-level).
                                  If no name is given, prints out list of all classes.

   .Class <name>                        - Prints out class <name> in a CINT-like style (all-levels).
                                  If no name is given, prints out list of all classes.

   .namespace                   - Prints list of all known namespaces

   .typedef <name>              - Prints out typedef <name> in a CINT-like style
                                  If no name is given, prints out list of all typedefs.

   .files                       - Prints names of all included (parsed) files

   .fileEx                      - Prints out included (parsed) file statistics
                                  as well as a list of their names

   .g <var>                             - Prints out information about global variable
                                  'var' - if no name is given, print them all

   .@                           - Cancels and ignores the multiline input

   .rawInput [0|1]              - Toggle wrapping and printing the
                                  execution results of the input

   .dynamicExtensions [0|1]     - Toggles the use of the dynamic scopes
                                  and the late binding

   .debug <level>               - Generates debug symbols (level is optional, 0 to disable)

   .printDebug [0|1]            - Toggles the printing of input's corresponding
                                  state changes

   .storeState <filename>       - Store the interpreter's state to a given file

   .compareState <filename>     - Compare the interpreter's state with the one
                                  saved in a given file

   .stats [name]                - Show stats for internal data structures
                                  'ast'  abstract syntax tree stats
                                  'asttree [filter]'  abstract syntax tree layout
                                  'decl' dump ast declarations
                                  'undo' show undo stack

   .T <filePath> <comment>      - Generate autoload map

   .trace <repr> <id>           - Dump trace of requested respresentation
                                  (see .stats arguments for <repr>)

   .help                        - Shows this information (also .?)

   .q                           - Exit the program

ROOT special commands.
   .L <filename>[flags]: load the given file with optional flags like
                         + to compile or ++ to force recompile.
                         Type .? TSystem::CompileMacro for a list of all flags.
   .(x|X) <filename>[flags](args) :
                         same as .L <filename>[flags] and runs then a function
                         with signature: ret_type filename(args).
   .credits            : show credits
   .demo               : launch GUI demo
   .help Class::Member : open reference guide for that class member (or .?).
                         Specifying '::Member' is optional.
   .help edit          : show line editing shortcuts (or .?)
   .license            : show license
   .ls                 : list contents of current TDirectory
   .pwd                : show current TDirectory, pad and style
   .quit (or .exit)    : quit ROOT (long form of .q)
   .R [user@]host[:dir] [-l user] [-d dbg] [script] :
                         launch process in a remote host
   .qqq                : quit ROOT - mandatory
   .qqqqq              : exit process immediately
   .qqqqqqq            : abort process
   .which [file]       : show path of macro file
   .![OS_command]      : execute OS-specific shell command
   .!root -?           : print ROOT usage (CLI options)

Thanks a lot!

Happened. I got to another disk, sorted the data - it turns out.
A bit unusual is the fundamental meaning of using “ . “ and/or “ → “ compared to version 5 in interactive mode, but this is a matter of further practice.

As for gSystem->cd(“d:\”) - it’s my fault, sorry, I’ll study the description v6 too.

Many thanks for the clarity and efficiency!

All the best!

P.S. Seeing the typed and displayed text in the letter, I realized/remembered what the combination of quotes and oblique lines means (in name). Thank you!

1 Like