-
Notifications
You must be signed in to change notification settings - Fork 6
Excluding files from upload
Users can limit what is uploaded from a folder by creating a file named .ddsignore
.
This file contains a list of file/folder patterns that should be excluded.
These patterns are only applied on files/folders within the folder the .ddsignore
file is contained.
Each line in a .ddsignore
file specifies a pattern.
These patterns follow the python fnmatch Unix shell-style wildcards.
Special characters used in shell-style wildcards:
Pattern Meaning
* matches everything
? matches any single character
[seq] matches any character in seq
[!seq] matches any character not in seq
Important distinction from standard unix shell matching python fnmatch:
Note that the filename separator ('/' on Unix) is not special to this module. ... Similarly, filenames starting with a period are not special for this module, and are matched by the * and ? patterns.
Using the --dry-run
option with upload
command can help you test out what will be uploaded while creating .ddsignore
files.
Given a project with this layout:
project1/
project1/data/
project1/data/file1.log
project1/data/file2.zip
project1/data/file3.bam
project1/somefile.log
Uploaded with a command like this:
ddsclient upload -p MyProject1 project1/
Create a file at project1/.ddsignore
with the following contents:
*.log
This would skip uploading these files:
project1/data/file1.log
project1/somefile.log
If the .ddsignore
file was moved to project1/data/.ddsignore
only project1/data/file1.log
would be skipped.
Given a project with this layout:
project2/
project2/data/
project2/data/backup.zip
project2/data2/
project2/data2/backup.zip
Create a file at project2/.ddsignore
with the following contents:
data2/*.zip
This would skip uploading these files:
project2/data2/backup.zip
The project2/data/backup.zip
file would still be included.
Given a project with this layout:
project2/
project2/partA/
project2/partA/save/
project2/partA/save/backup.zip
project2/partB/
project2/partB/save/
project2/partB/save/backup.zip
Create a file at project2/.ddsignore
with the following contents:
save/
This would skip uploading these items:
project2/partA/save/
project2/partA/save/backup.zip
project2/partB/save/
project2/partB/save/backup.zip