gorby
(RPA Ninja)
1
こんばんは。
UiPath Studio 2024.10.6Community editionのユーザです。
特殊変数Environment.CurrentDirectoryについて教えてください。
デバッグ中にローカルパネルでString変数の値をみたら、
Environment.CurrentDirectory\Log\
などと文字列でEnvironment.CurrentDirectoryが入っていました。
これは、実行時にEnvironment.CurrentDirectoryがカレントディレクトリに変換されるのでしょうか。
それとも文字列Environment.CurrentDirectoryのまま?
ashokkarale
(Ashok Karale)
2
@gorby,
At runtime this Environment.CurrentDirectory will return the path from where the package is running.
Like this.
Yes, it will be the path from where the package is executing.
Yoichi
(Yoichi)
3
こんにちは
上記の画像の状態ですと後者になります。
例えば代入アクティビティ等で
System.Environment.CurrentDirectory + "\ScreenShot\"
のようにする必要があります。
gorby
(RPA Ninja)
4
追加で教えてください。別の方が
Environment.CurrentDirectory
はPackageの配置場所だと言っていますが、それは誤りで、プロジェクトフォルダのパスという認識で合っていますか?
Yoichi
(Yoichi)
5
CurrentDirectoryなので現在のディレクトリが返ってきます。
Studioからの実行の場合、そのプロジェクトのproject.jsonがある場所になると思いますし、Assistantからの実行の場合は。%USERPROFILE%\.nuget\packages 以下の当該パッケージ・バージョンの場所になると思います。
system
(system)
Closed
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.