---
sidebar_position: 5
description: Synchronize folders and other functions to work with Neocities in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Neocities]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Synchronize folders
 Creates a copy of the local directory at the selected path on the Neocities server



`Function SynchronizeFolders(Val Token, Val LocalFolder, Val RemoteFolder = "") Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Auth token |
  | LocalFolder | --local | String | &#x2714; | Local source catalog |
  | RemoteFolder | --remote | String | &#x2716; | Remote receiver catalog. Root by default |

  
  Returns:  Structure Of KeyAndValue - synchronization error information

:::tip
Neocities API docs: [neocities.org/api](https://neocities.org/api)

The method deletes files on the server if they do not exist in the local directory
:::
<br/>


```bsl title="1C:Enterprise/OneScript code example"
    Token = "f1e616e20ab5893b...";

    LocalFolder  = "C:\test_site";
    RemoteFolder = "test_sync";

    Result = OPI_Neocities.SynchronizeFolders(Token, LocalFolder, RemoteFolder);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint neocities SynchronizeFolders \
             --token "***" \
             --local "C:\test_site" \
             --remote "test_sync"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint neocities SynchronizeFolders ^
             --token "***" ^
             --local "C:\test_site" ^
             --remote "test_sync"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "errors": 0,
 "items": []
}
```
