Copy files periodically in the background

Hello, is it possible to copy perridically files of a certain folder to another folder in the background? The perfect script would be that every time a file is created or updated in the source folder the script makes a copy to a destination folder. It should not be done with a complete mirroring of the hard drive like with RAID. Only one folder, only new or edited files.

You could, but Opus isn't the best tool for that kind of thing. An automated backup or background sync tool would do a better job.

Hello Leo, as it is only one folder to watch I didn´t want to have an additional background process for the backup programm. As Directory Opus is constantly open on my desktop I thought, a script would be better. To give you additional information: I have a CAD-Programm (AutoCAD) which writes backup file every x minutes (x=user defined). If I accidentally close a file without saving this backup file is also deleted. But not only deleted, it seems, that this file did never exist. It is not in the recyle.bin nor I can restore it with a undelete program (Recuva). It is possible to lose hours of work. So I want to copy this file either in the same interval or every time the file is written in that folder.

If you want something simple, you could use Task Scheduler (built into Windows) to run a .bat file that uses the Windows copy command to copy the file (or a wildcard), and set it to run every x minutes.

Thank you very much, I will try it.

Hi - I also use AutoCAD on a daily basis. The best and most efficient way to accomplish this is to change the auto-save location and also the backup location. There is a command - "MOVEBAK" which would make this issue become a non-issue automatically. You would have to manually delete the files in the folders once in a while. I typically empty the folder when I am certain the drawing is completed and approved. You could easily create a .bat file and shortcut which would empty the folder with one-click. Hope this helps.... I added a link to a webpage which explains this in fairly good detail.

The other thing I would recommend, if you are using Windows 8 or 10, is File History to backup your files and versions of the files.

Hello JColburn, thank you for the tip to move the BAK-Files, which I couriously didn´t know (working since 1989 with AutoCAD;). This would be really useful to prevent filling up the project folders with *.bak files. Sadly this command doesnt work on my AutoCAD 2021. Regardless which directory I type in (for example "C:\Temp" or "c:\temp" ) I ever get a "Not a directory: c:\temp" response. Sadly I can not move the auto.sv$ which ist the file I want to make sure not to lose it.

Type /temp or %TEMP% (the latter works in File Explorer as well) into the path field in Opus to locate your temp folder, which is (or at least should be) what's likely being used. It isn't usually C:\Temp these days.

Hello Leo, your tip was solving my problem! Thank you very much!

There is this concept, often called "folder watch" or "folder monitoring", which I used to use for automating actions whenever contents of a folder change, e.g. when a new file in this folder and subfolders is created do this, when a file is changed or deleted do that, etc. The possibilites go far beyond simple backups, like downloading files sent by other machines, checking certain folders' integrity, sending emails, virus-scanning files, etc.

I don't use that original tool (PowerPro) anymore but there are plenty of alternatives which reportedly do something similar. There are a couple Github projects as well, like this one, but I used none of the tools above. Nowadays I only need backup and one perfect tool is SyncBack, which is a full-fledged backup solution and might be too expensive just for this purpose but it can do exactly what you want, plus a gazillion things, pretty much the DOpus of personal backup solutions.

HTH

You are welcome. I have used this feature for sometime because it brings peace to my wife from the yelling (actually swearing) at AutoCAD/Computer whenever I lose things because of crash, power outages etc. I also have "File History" turned on and it is a life (swear) saver. Give it a try...

Thank you very much. As a backup solution I also use a tool, called Synchronizer, wich fulfill my needs. For the purpose of copying onla one or some more files to another drive I now use indeed the Windows Task Scheduler, as Leo suggested. I will ad some lines in the batch to look wether the acad.exe is executed, so that the batch only works if I work with AutoCAD. But I will have a look on your mentioned tools too...

Hello Leo,
what I wrote regarding the "C:\Temp" directory is related to a command inside the AutoCAD program. So sadly your tip doesn´t work here (I tried it).

For your needs try a real backup app like Syncback or Reflect, or if you have a NAS like from Synology, one of their tools. DO is a file manager, not a backup solution.

You can use /temp to find the path to your temp folder, then plug that path into AutoCAD. You don't need to use /temp in AutoCAD.

I prefer a backup program called Synchronizer which I use weekly. Not as a background proccess. I´m old school. Project data I save daily when I begin to work with a batch, linked to Dopus. The auto.sv$ I mentioned is only one file I want to save periodically. So I use now the TaskScheduler with a tiny batch. It works perfect. I only have to find out, why this task wakes up my computer from sleep, what it, according to Microsft, shouln´t do with the default settings for a task.