---
title: "Move a SIL directory"
canonical: "https://support.appfire.com/space/PSJ/811696370/Move%20a%20SIL%20directory"
format: markdown
---
> Macro (aura-html)

> Macro (button-handy)



> Macro (excerpt)
> 
> A utility that will move a directory of SIL scripts to another directory.

> ℹ️ Note: this script uses Linux based commands that may need to be modified for other operating systems.

```
/**
* Moves a file(s)/directory to a new location
* @author Tim Reiking
* @date   2020/4/8
*/

string dirName = "";                    // The destination directory within the main directory
string[] sources = "";                  // An array of files and directories to move

string path = silEnv("sil.home")+"/";   // Main directory
string dest = path+dirName;             // The full path
runnerLog(dest);

for(string source in sources) {
    source = path+source;
    
    runnerLog(source);
    if(directoryExists(dest) && (directoryExists(source) || fileExists(source))) {
        runnerLog("Moving...");
        system("mv "+source+" "+dest);
    }
}
```