eetaylog Posted March 16, 2009 Share Posted March 16, 2009 (edited) Bit of an odd one, but i want to set up a small command in XP to copy a small database file (.db3) from my desktop to another location on my C: drive every 15 minutes or so. anyone know how id go about it, would a macro be able to do it? Edited March 16, 2009 by eetaylog Link to comment Share on other sites More sharing options...
bluliz Posted March 16, 2009 Share Posted March 16, 2009 Are you trying just to create a backup of the DB every 15 mins? or do you want something a little more complex....like creating a copy in a time and data stamped folder??? Link to comment Share on other sites More sharing options...
eetaylog Posted March 17, 2009 Author Share Posted March 17, 2009 just want to create a backup every 15 minutes. basically (*bear with me here!*), its a database of information about my ripped dvds (actors, running time, what the film is about etc) that i use in a media centre GUI. theres a bug in the software though that deletes the information in the database about a film when youve finished watching it, so as a workaround i thought i could copy and paste the database file from its original location into the folder where the GUI looks for it, that way, even if the software deletes the information, itll be re-copied in 15 mins anyway. do-able? Link to comment Share on other sites More sharing options...
Stu Posted March 17, 2009 Share Posted March 17, 2009 (edited) If the file is in use then you'll have fun and games trying to get it copied. Otherwise just create a batchfile, eg c:\copydb.cmd - edit it in notepad and put in something like copy c:\mydatabase.db3 x:\destination\folder\mydatabase.db3 .. and then schedule it in windows task scheduler (programs/accessories/system tools/task scheduler) edit: you may want to do like "cmd /c c:\copydb.cmd" in task scheduler Edited March 17, 2009 by Stu Link to comment Share on other sites More sharing options...
eetaylog Posted March 17, 2009 Author Share Posted March 17, 2009 ok, cheers for the pointer, ill have a play around with task scheduler. so just so im clear, i setup a command in notepad and save it with a .cmd extension, then point task scheduler to that file and tell it to perform it every x min/hours/days. is.... Copy C:\films.db3 C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\database\films.db3 ..the correct type of notation to use in a .cmd execution, or will it throw a wobbly for not using specific syntax? Link to comment Share on other sites More sharing options...
Stu Posted March 17, 2009 Share Posted March 17, 2009 you'll want quote marks around any paths with spaces, eg "C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\database\films.db3" Try the command outside of task scheduler first.. just open a command prompt and run the batch file Link to comment Share on other sites More sharing options...
eetaylog Posted March 17, 2009 Author Share Posted March 17, 2009 yep, worked a treat as a test i just ran a command to copy a test .jpg from one place to another using Copy "C:\Documents and Settings\gtaylor\Desktop\2.jpg" "C:\Documents and Settings\gtaylor\Desktop\MediaPortal" thanks for that, never created a command file before Link to comment Share on other sites More sharing options...
Stu Posted March 17, 2009 Share Posted March 17, 2009 There are ways to stop the command prompt coming up on the screen.. have a google around 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