For users‎ > ‎

Manipulate sequences

  • List
List current folder
sam ls

List several folders
sam ls folder1 folder2

List only sequences in current folder and its subfolders
sam ls -s --recursive

List only sequences without holes, with specific rv formatting
sam ls -s --detect-without-holes --format rv

List current folder and explode sequences with holes as sequences without holes
sam ls --explode-sequences

  • Copy
Copy part of a sequence (from image 100 to 200)
sam cp /path/to/sequence/seq.###.jpg  /path/to/out_sequence/seq.###.jpg --input-first 100 --input-last 200

Copy and renumber from 0
sam cp /path/to/sequence/seq.###.jpg  /path/to/out_sequence/seq.###.jpg --output-first 0

  • Move
Move a sequence and remove holes
sam mv /path/to/sequence/seq.###.jpg  /path/to/out_sequence/ --remove-holes

Move a sequence and rename it
sam mv /path/to/sequence/seq.###.jpg  /path/to/out_sequence/new-seq.###.jpg --remove-holes
  • Remove
Remove images 0 to 100 from a sequence
sam rm /path/to/sequence/seq.###.jpg  --range 0 100

Tips
As you can see '#' character is used to represent the padding of a sequence.
But sometimes it is annoying to write the padding of your sequence (too long), or in case you have a sequence with a variable padding, you can use the '@' character instead:
sam mv in-seq-with-long-padding.#########.jpg out-seq-with-long-padding.#########.jpg // KO (annoying!)
sam mv in-seq-with-long-padding.@.jpg out-seq-with-long-padding.@.jpg // OK


sam mv seq-with-variable-padding.###.jpg // KO (only the files with 3 digits will be removed)
sam rm seq-with-variable-padding.@.jpg // OK

Warnings
Because you use a terminal to launch these command lines, some special characters are interpreted by the bash before sam.

Sequences with a name which starts with sharps (which are comments for the bash):
sam mv in-seq.###.jpg ###.out-seq.jpg // KO
sam mv in-seq.###.jpg '###.out-seq.jpg' // OK

sam rm ###.seq.jpg // KO
sam rm '###.seq.jpg' // OK


Same thing with spaces, interpreted as several arguments:
sam mv in seq.###.jpg out seq.###.jpg // KO
sam mv in\ seq.###.jpg out\ seq.###.jpg // OK

Comments