Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - Français

Change language to:
English - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Aide de Scilab >> Entrées/Sorties [fichiers] > Répertoire > chdir

chdir

change le répertoire courant de Scilab

cd

change le répertoire courant de Scilab

Séquence d'appel

b = chdir(path)
realpath = cd(path)
cd path

Paramètres

path

une chaîne de caractères fournissant le chemin du répertoire. home par défaut.

b

booléen : %t si le changement de répertoire courant a été effectué avec succès.

realpath

une chaîne de caractères, le chemin effectif après conversion (voir ci-dessous)

Description

Change le répertoire courrant de Scilab par celui donné par la variable path.

Notez que le chemin fourni est converti (constantes prédéfinis SCI, SCIHOME, TMPDIR, home, etc). Ainsi SCI/modules/fileio/macros est un chemin valide pour Unix et Windows. Si path est vide , le chemin de destination est alors "home".

Exemples

chdir("SCI/etc")
pwd
cd ..
cd TMPDIR
p = cd()
p == home
--> chdir("SCI/etc")
 ans  =
  T

--> pwd
 ans  =
 C:\Programs\scilab\scilab-6.0.2\etc


--> cd ..
 ans  =
 C:\Programs\scilab\scilab-6.0.2

--> cd TMPDIR
 ans  =
 C:\Users\Me\AppData\Local\Temp\SCI_TMP_5444_26901

--> p = cd()
 p  =
 C:\Users\Me

--> p == home
 ans  =
  T

Voir aussi

  • isdir — checks that a path points to an existing directory
  • pwd — affiche le répertoire courant de Scilab
  • home — Gives the user directory.
  • filebrowser — Open the Scilab file browser
  • uigetdir — dialog for selecting a directory
Report an issue
<< Répertoire Répertoire createdir >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:33:07 CET 2022