Sophie

Sophie

distrib > Fedora > 15 > x86_64 > by-pkgid > dd0d180a9014fcb52932f075ceacae65 > files > 11

fsniper-1.3.1-6.fc15.x86_64.rpm

watch {
      
    # watch the ~/drop directory for new files
    ~/drop {
        # matches any mimetype beginning with image/
        image/* {
            # %% is replaced with the filename of the new file
            handler = echo found an image: %%
        }

        # matches any file ending with .extension
        *.extension {
            # the filename is added to the end of the handler line if %% is not present
            handler = echo glob handler 1: 
            # the second handler will be run if the first exits with a return code of 1
            handler = echo glob handler 2: %%
        }

        # run handlers on files that match this regex
        /.*regex.*/ {
            handler = echo regex handler
        }

        # generic handler to catch files that nothing else did
        * {
            handler = mv %% ~/downloads/
        }
    }

}