Hi guys, first post so please go easy.
I researched around and couldn't find/deduce a definitive answer for this so I am asking for help!
I'm trying to write a script to monitor a folder for new/modified files, and if execute another batch and then move them to a different folder.
Basically I'm trying to monitor a folder called /sass, and move the new files/modified from /sass into another folder called /css.
Here is what I have so far... I put the parts I can't figure out in {} brackets. I tried expressing myself in a form of pseudo-code.
{monitor folder c:\sass}
{if newfile||modified file detected}
// sass is the name of the script im executing, it runs the sass script on the new sass file, then puts the result in the new *.css file
c:\ruby\bin\sass c:\sass\{newfile||modifiedfile}.sass > c:\css\{newfile||modifiedfile}.css
I'm not sure:
1. How to watch the /sass folder for modified/new *.sass files
2. How to grab the name of the *.sass file into a string, then create a new *.css file using that string. So if I create demo.sass, the batch file will be able to name the output demo.css.
I hope this is not too confusing. Anyone got some tips for a newbie? ^_^