Page 1 of 1

[Solved] How to unify script - sort files based on tags?

Posted: 29 May 2013 08:30
by stanmarsh
hello xyplorer community,

i have made a simple scriptlets that moves files based on their tags, i would like to combine them into one so i would just click once and it will sort all files into their respective specified folder.

in my video folder i tagged files by "watched" & "playlist" and files with no tags = movies not yet seen

watched = movies already seen
playlist = movies going to watch

code:
selfilter "watched",,"tags";
moveto "c:\video\watched",":list";

selfilter "playlist",,"tags";
moveto "c:\video\playlist",":list";

i like these to code to combine into one.

TIA

Re: How to unify script - sort files based on tags?

Posted: 29 May 2013 11:27
by Stefan
See help > Scripting > Script Files

and the upwards to "Multi-Scripts"
A script can have more than one line (multi-line script),
and a script resource can have more than one script (multi-script).


For example, this is one "main" script resource with two scripts (multi-script)

Code: Select all

"watched = movies already seen"
    selfilter "watched",,"tags";
    moveto "c:\video\watched",":list";

"playlist =  movies going to watch"
   selfilter "playlist",,"tags";
   moveto "c:\video\playlist",":list";

Is it that?

Re: How to unify script - sort files based on tags?

Posted: 29 May 2013 13:46
by stanmarsh
Stefan, thanks for the help,

i read the help and realized i need to indent it so it will act as one big script!

"watched & playlist = movies watched and the next attraction"
selfilter "watched",,"tags";
moveto "c:\video\watched",":list";
selfilter "playlist",,"tags";
moveto "c:\video\playlist",":list";

thanks again! solved!