# Moving common functionality into a function?

**URL:** https://www.finalbuilder.com/forums/t/moving-common-functionality-into-a-function/2451
**Category:** Discussion
**Created:** [January 6, 2016, 2:52am UTC](https://www.finalbuilder.com/forums/t/moving-common-functionality-into-a-function/2451 "2016-01-06T02:52:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![softperfect](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/b5ac83/32.png) [@softperfect](https://www.finalbuilder.com/forums/u/softperfect)
#### Post date: [January 6, 2016, 2:52am UTC](https://www.finalbuilder.com/forums/t/moving-common-functionality-into-a-function/2451/1 "2016-01-06T02:52:30Z")

</div>

We’ve got multiple FB scripts, which share very almost identical blocks of code. For example:  
  
SFTP Connect  
try  
UploadFile  
finally  
SFTP Disconnect  
end;  
  
Is there a way in FB to define some sort of function to have this code in one place and call it from multiple build scripts?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [January 6, 2016, 9:59am UTC](https://www.finalbuilder.com/forums/t/moving-common-functionality-into-a-function/2451/2 "2016-01-06T09:59:42Z")

</div>

Hi Andrew   
  
 You can move that functionality to separate project, and then call it using the Include Project action - [http://wiki.finalbuilder.com/display/FB8/Include+Project+Action](http://wiki.finalbuilder.com/display/FB8/Include+Project+Action)
