Jump to content

Macro's


eetaylog

Recommended Posts

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 by eetaylog
Link to comment
Share on other sites

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

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 by Stu
Link to comment
Share on other sites

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

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

yep, worked a treat :thumb:

 

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...