Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - 日本語

Change language to:
English - Français - 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

Scilabヘルプ >> Files : Input/Output functions > Directory > chdir

chdir

Scilab カレントディレクトリを変更する

cd

Scilab カレントディレクトリを変更する

呼び出し手順

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

パラメータ

b

chdir処理がokの場合に論理値 %t.

path

文字列

realpath

文字列, パス名変換の後に実際のパス名(以下参照)

説明

カレントの Scilab ディレクトリをpath で指定したディレクトリに変更します. パス変換が実行されるため,例えば, SCI/modules/core/macrosは unix および windows の両方で 有効であることに注意してください. path が空の場合, "home" ディレクトリに変更されます.

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

参照

  • isdir — 引数がディレクトリパスかどうかを調べる
  • pwd — Scilab カレントディレクトリを出力
  • home — ユーザディレクトリを取得する.
  • filebrowser — Scilabファイルブラウザを開く
  • uigetdir — ディレクトリを選択するダイアログ
Report an issue
<< Directory Directory 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:37:52 CET 2022