Skip to main content

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

ParameterCLI optionTypeRequiredDescription
Token--tokenStringAuth token
LocalFolder--localStringLocal source catalog
RemoteFolder--remoteStringRemote receiver catalog. Root by default

Returns: Structure Of KeyAndValue - synchronization error information


tip

Neocities API docs: neocities.org/api

The method deletes files on the server if they do not exist in the local directory


1C:Enterprise/OneScript code example
    Token = "7419cd51de4037f7...";

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

Result = OPI_Neocities.SynchronizeFolders(Token, LocalFolder, RemoteFolder);
    oint neocities SynchronizeFolders \
--token "***" \
--local "C:\test_site" \
--remote "test_sync"
Result
{
"errors": 0,
"items": []
}