ecirillo Posted October 8, 2009 Share Posted October 8, 2009 I have just downloaded AutoIt. I have a simple script that I'm looking to automate when it sees a particular file in the directory. The script below renames the file, and then moves it into another folder. for /f "Tokens=1-4 Delims=/ " %%a in ('date /t') do set SortDate=%%c%%a%%b for /f "Tokens=1-2 Delims=: " %%a in ('time /t') do set SortTime=%%a%%b ren upload.php upload_%SortDate%_%SortTime%.php Move upload*.php Archive How would I go about getting the script to look at the directory every 30 seconds to see if the upload.php file exists, then execute the script automatically? Please help. Newbie Link to comment Share on other sites More sharing options...
FuryCell Posted October 8, 2009 Share Posted October 8, 2009 While 1 Sleep(30000) If FileExists("upload.php") then Run("script.bat") WEnd change upload.php and script.bat to reflect there actual locations. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
jvanegmond Posted October 8, 2009 Share Posted October 8, 2009 I have just downloaded AutoIt.There we go again. You've just downloaded AutoIt and you don't know how to do anything in it. So what is the first thing you do? Of course, ask the community! The community's probably bored out of their minds, they could use someone like me. I have a lot of scripts to be written and with some luck I can make the community do everything for me.In all seriousness, if you've just downloaded AutoIt then your first task is to learn AutoIt. Not ask the community to write your stuff for you. github.com/jvanegmond Link to comment Share on other sites More sharing options...
ecirillo Posted October 8, 2009 Author Share Posted October 8, 2009 There we go again. You've just downloaded AutoIt and you don't know how to do anything in it. So what is the first thing you do? Of course, ask the community! The community's probably bored out of their minds, they could use someone like me. I have a lot of scripts to be written and with some luck I can make the community do everything for me.In all seriousness, if you've just downloaded AutoIt then your first task is to learn AutoIt. Not ask the community to write your stuff for you. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now