# Command “.dir” in ROOT v6 on W10?

**URL:** <https://root-forum.cern.ch/t/command-dir-in-root-v6-on-w10/49548>\
**Category:** Newbie\
**Created:** [April 11, 2022, 8:02pm UTC](https://root-forum.cern.ch/t/command-dir-in-root-v6-on-w10/49548 "2022-04-11T20:02:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vladi](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@Vladi](https://root-forum.cern.ch/u/Vladi)\
**Post date:** [April 11, 2022, 8:02pm UTC](https://root-forum.cern.ch/t/command-dir-in-root-v6-on-w10/49548/1 "2022-04-11T20:02:17Z")

</div>

Hello,  
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.

 ![1](https://root-forum.cern.ch/uploads/default/original/3X/4/b/4b9abd31c21f113dc1e512729cfcee81f44c6265.gif)

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.

Thanks!

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [April 12, 2022, 5:31am UTC](https://root-forum.cern.ch/t/command-dir-in-root-v6-on-w10/49548/2 "2022-04-12T05:31:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [April 12, 2022, 6:43am UTC](https://root-forum.cern.ch/t/command-dir-in-root-v6-on-w10/49548/3 "2022-04-12T06:43:51Z")

</div>

Try with `.!dir`

```auto
C:\Users\bellenot\temp>root
   ------------------------------------------------------------------
  | Welcome to ROOT 6.27/01 https://root.cern |
  | (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 cpt.py
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]

```

---

<div class="post-metadata">

**Author:** ![Vladi](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@Vladi](https://root-forum.cern.ch/u/Vladi)\
**Post date:** [April 12, 2022, 1:56pm UTC](https://root-forum.cern.ch/t/command-dir-in-root-v6-on-w10/49548/4 "2022-04-12T13:56:35Z")

</div>

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.

 ![2](https://root-forum.cern.ch/uploads/default/original/3X/8/9/89dae577d9324db7d1a6683973fd65046d01355c.gif)

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!

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [April 12, 2022, 2:14pm UTC](https://root-forum.cern.ch/t/command-dir-in-root-v6-on-w10/49548/5 "2022-04-12T14:14:38Z")

</div>

To change the current directory, use [TSystem::cd()](https://root.cern.ch/doc/master/classTSystem.html#a12ee695558062b937d6f96da57de7fd0) 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:

```auto
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)

```

---

<div class="post-metadata">

**Author:** ![Vladi](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/ac8455/32.png) [@Vladi](https://root-forum.cern.ch/u/Vladi)\
**Post date:** [April 13, 2022, 6:44am UTC](https://root-forum.cern.ch/t/command-dir-in-root-v6-on-w10/49548/6 "2022-04-13T06:44:46Z")

</div>

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!
