# How to define a condition expression

**URL:** https://discourse.julialang.org/t/how-to-define-a-condition-expression/29622
**Category:** New to Julia
**Created:** [October 7, 2019, 9:50pm UTC](https://discourse.julialang.org/t/how-to-define-a-condition-expression/29622 "2019-10-07T21:50:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Lyupinpin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lyupinpin/32/9295_2.png) [@Lyupinpin](https://discourse.julialang.org/u/Lyupinpin)
#### Post date: [October 7, 2019, 9:50pm UTC](https://discourse.julialang.org/t/how-to-define-a-condition-expression/29622/1 "2019-10-07T21:50:15Z")

</div>

Like  
if there exsis a file named “abc”  
then  
else  
end

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [October 7, 2019, 10:02pm UTC](https://discourse.julialang.org/t/how-to-define-a-condition-expression/29622/2 "2019-10-07T22:02:54Z")

</div>

It basically is correct what you have so not sure I understand what you are actually asking for. Anyway:

```julia
if isfile("abc")
    # do this
else
    # do that
end

```

---

<div class="post-metadata">

### Author: ![Lyupinpin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lyupinpin/32/9295_2.png) [@Lyupinpin](https://discourse.julialang.org/u/Lyupinpin)
#### Post date: [October 7, 2019, 10:09pm UTC](https://discourse.julialang.org/t/how-to-define-a-condition-expression/29622/3 "2019-10-07T22:09:19Z")

</div>

Oh, Thank you very much! I mean this
