{% extends "help/help_base.html" %} {% load i18n %} {% block ignore %}tab-cur{% endblock %} {% block help_con %}

{% trans "Excluding files/folders from syncing" %}

{% trans "Sometimes you don't want to sync some files or folders inside a library. To achieve this, you can create a file named seafile-ignore.txt in the root folder of this library. In this special file, you specify the files and folders that Seafile should not sync. Each line in this file specifies a pattern. The following pattern format are supported." %}

  1. {% trans "A blank line matches no files." %}
  2. {% trans "A line starting with # serves as a comment." %}
  3. {% blocktrans %}Seafile supports wildcards in the pattern. For example, "foo/*" matches "foo/1" and "foo/hello". "foo/?" matches "foo/1" but not "foo/hello". Note that the wildcard character * recursively matches all the paths under a folder. For instance, "foo/*.html" matches "foo/a.html" and "foo/templates/b.html".{% endblocktrans %}
  4. {% blocktrans %}If the pattern ends with a slash, it would only match a folder. In other words, foo/ will match a folder "foo" and paths underneath it, but will not match a regular file or a symbolic link "foo".{% endblocktrans %}
  5. {% blocktrans %}If a pattern doesn't end with a slash or a wildcard, it would not match a folder. For example, "foo" can only match regular file "foo" or a symbolic link; while "foo/" and "foo*" match a folder and paths under it.{% endblocktrans %}

{% trans "Example" %}

# a regular file
test-file

# a dir
test-dir/

# wildcard *
test-star1/*
test-star2/*.html

# wildcard ?
test-qu1/?.html
test-qu2/?/

{% trans "Notes" %}

{% trans "The seafile-ignore.txt file only controls which files to exclude on the client side. You can still create a file from seahub web interface that's excluded on the client. In this case," %}

{% trans "seafile-ignore.txt only ignores files that are not synced yet. If a file is already synced, and some time later you add it to the ignore list, its existing versions won't be removed." %}

{% endblock %}