Home / FAQs / Installation and Configuration / How do I set the current working directory for Dyalog?
Motivation for setting current directory:
If you do not have write permission for the current directory, you will not be able to save a workspace or continue workspace in that directory.
You can get an error message like the following:
)save myws
Can’t save – file could not be created.
You could specify a full path for the save command.
)save c:\tmp\myws
You can set the current directory in the shortcut that starts Dyalog by right clicking on it and choosing Properties. On the Shortcut tab, edit the “Start in” field.
You can also set it under program control by using the SetCurrentDirectory function from the supplied files workspace or by using the ]cd user command:
⍝⍝⍝ Check current directory
]cd
d:\18ws
⍝⍝⍝ Change it
]cd c:\tmp\
d:\18ws
]cd
c:\tmp
⍝⍝⍝ Or:
)load files
C:\Program Files (x86)\Dyalog\Dyalog APL 13.2 Unicode\ws\files saved Wed Jan 30 18:14:48 2013
Files.SetCurrentDirectory 'c:\tmp\'
Files.GetCurrentDirectory
c:\tmp
Vince|Dyalog
Posts: 426
Joined: Wed Oct 01, 2008 9:39 am
Top
If you’ve got a technical query, you might find the answer in our documentation or on our forums. Otherwise, please email us at support@dyalog.com, call +44 1256 830030, or send us a message.
Home / FAQs / Installation and Configuration / How do I set the current working directory for Dyalog?
Get tips and the latest news. We’ll never spam you. Unsubscribe at any time.
Copyright © 2004 – 2025 Dyalog Ltd.
Technical advice and assistance on all aspects of Dyalog usage is available by e-mail (support@dyalog.com) and/or telephone (+44 1256 830030 – limited to U.K. office hours). Limited advice on design and coding is available, but is not intended to replace the use of the printed and on-line documentation. Except when reporting an issue with the software, users are encouraged to seek advice from the user community via the Dyalog Forum (reading the content of the forums does not require membership).