Modify Erlang default path under Windows system

Source: Internet
Author: User

Create a new. Erlang File:

Io:format ("consulting. Erlang in ~p~n", [Element (2, FILE:GET_CWD ())]).

C:CD ("C:/erl5.7.2/work"). % Note is the symbol "/" instead of "\". The catalogue changes according to individual needs

Io:format ("Now in:~p~n", [Element (2, FILE:GET_CWD ())]).

To view the properties of the Erlang executable program:

For example, my environment:

Erlang Shell Path: C:\erl5.10.2\bin\werl.exe

Its actual use directory: C:\ERL5.10.2\USR (default starting directory)

Place the created. Erlang file in the default start directory C:\erl5.10.2\usr.

This will automatically switch the current directory to C:\erl5.10.2\work each time it is started

Add two points:

1. You need to ensure that the new working directory does exist, otherwise viewing the environment using the PWD () command is still the default.

2. If you enter C:\erl5.10.2\bin\ to run the Werl.exe file, the environment that is viewed with the PWD () command is C:/erl5.10.2/bin, when the. Erlang file is placed in the corresponding directory.

Under command line:

1> CD ("c:/"). % Setting Directory
2> pwd (). % View current directory

Modify Erlang default path under Windows system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.