How to change working directory in julia with atom

#1

The command to change working directory is cd(dir::AbstractString=homedir()). Can anyone give an example as how to use it?

1 Like

Problem with atom using julia
#2

cd("../mydir/someotherdir/")

1 Like

#3

Thank you. Worked fine. I was trying cd(“D:\study\juliaprog”)
which was giving me error.

0 Likes

#4

Backslashes on Windows: you have to double them.
cd(“D:\\study\\juliaprog”)
(“Escape” the backslash.)

1 Like

#5

cd(“D:\study\juliaprog”) was also not working. Showing error.

0 Likes

#6

or use a Raw String Literal

cd(raw“D:\study\juliaprog”)
1 Like

#7

Worked fine

0 Likes

#8

Hi

I used this method, but the issue is not solved, e.g.

 cd("D:\\Downloads\\AbaqusReader.jl-master")
 filename = Pkg.dir("AbaqusReader","test","test_sparse_mesh","cube_tet4.inp")
mesh = abaqus_read_mesh(filename)

ERROR: SystemError: opening file “C:\Users\test\.julia\packages\AbaqusReader\sDEH0\test\test_sparse_mesh\cube_tet4.inp”: No such file or directory

How can we change the work folder in JULIA 1.1.0?

0 Likes

#9

With cd. Check the current working directory with pwd. Your problem is because Pkg.dir (which AFAIU is deprecated) gives you an absolute path so your working directory has no influence.

1 Like

#10

Hi

thanks! one more question: where can we find the output file from

abaqus_read_mesh(filename)
0 Likes

#11

There is no output file. It returns a dictionary with the information parsed from the file.

1 Like

#12

You are asking specifically for the file “C:\Users\test.julia\packages\AbaqusReader\sDEH0\test\test_sparse_mesh\cube_tet4.inp” and if this file does not exist you get an error message. Your work folder has no bearing on that.

1 Like

#13

What does “reexport” mean?

If we convert Abaqus inp file to a dict, which kind format of output file

What do you want to do?

e.g. we can use this output file for 
# [KristofferC](https://github.com/KristofferC)/ **[FEM.jl](https://github.com/KristofferC/FEM.jl)**
0 Likes

#14

Thank you. Professor!

0 Likes

#15

What does “reexport” mean? What do you want to do?

You have an Abaqus input file stored on disk. What do you want to do with it?

0 Likes