Help! need a script that creates a file in a defined folder

Come up with a useful post-processing script? Share it here!
Post Reply
Derbyboy
Newbie
Newbie
Posts: 3
Joined: August 2nd, 2011, 4:40 pm

Help! need a script that creates a file in a defined folder

Post by Derbyboy »

I need a post-processing script that creates a file when download is finished. I´m gonna use that file to trigger an action in Eventghost/Directory Watcher. As is is now all the rars triggers actions and I just want one action.

Pls Help

Thanks

/D
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Help! need a script that creates a file in a defined fol

Post by shypike »

@echo off
Echo aktie >d:\pad\naar\mijn\file
Derbyboy
Newbie
Newbie
Posts: 3
Joined: August 2nd, 2011, 4:40 pm

Re: Help! need a script that creates a file in a defined fol

Post by Derbyboy »

Thanks alot

Sorry I´m really new at his.

Is it just to save the script with the extension .sh for example aktie.sh and then point sabnzbd to correct folder (the Post-Processing Scripts Folder)?

And of course change the path (d:\pad\naar\mijn\file).

Tanks
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Help! need a script that creates a file in a defined fol

Post by shypike »

For Linux, the script will different.
After saving to a file you also need to set the X bit.
chmod +x filepath

Your script would be:
#!/bin/sh
echo action >/path/to/file
Derbyboy
Newbie
Newbie
Posts: 3
Joined: August 2nd, 2011, 4:40 pm

Re: Help! need a script that creates a file in a defined fol

Post by Derbyboy »

But i use Windows, should I ide the first code you provided then and save as for example aktion.sh?

Thanks for your time
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Help! need a script that creates a file in a defined fol

Post by shypike »

On Windows scripts have a .cmd extension.
Post Reply