How to backup a directory

I'm trying to create a button that will allow me to select a directory, or a number of directories, one one side of a dual lister and then copy it to the destination. I've tried the following but it isn't working. Would someone please point out where I am going wrong?

sync:dopusrt /cmd Go E:\Customers
sync:dopusrt /cmd Select {s}

sync:dopusrt /cmd go F:\Backups\Customers
sync:dopusrt /cmd Set STATE=Dest

sync:dopusrt /cmd copy

Based on what you have described here, this is exactly what the standard Copy command does. You select a number of folders or files in the source lister pane, click on the Copy button, and Opus copies them to the destination lister pane. So this description is most likely inaccurate of what you are really trying to accomplish.

[quote]I've tried the following but it isn't working. Would someone please point out where I am going wrong?

sync:dopusrt /cmd Go E:\Customers sync:dopusrt /cmd Select {s} sync:dopusrt /cmd go F:\Backups\Customers sync:dopusrt /cmd Set STATE=Dest sync:dopusrt /cmd copy[/quote]

I'm not sure, but based on your code above, it seems like you are trying explicitly name a source and destination folder.

The command sync:dopusrt /cmd Select {s} is telling Opus to select what is already selected, except after the Go command above this line, nothing will be selected because the Go command tells Opus to list a new path, wiping out any current selection.

Considering that your two folder paths were named "Customers" and "Backups\Customers", I'm guessing you want to take routine backups up some folders. If that is the case, try this:

sync: dopusrt /CMD Go OPENINLEFT PATH "E:\Customers" sync: dopusrt /CMD Go OPENINRIGHT PATH "F:\Backups\Customers" sync: dopusrt /CMD Set SOURCE=Left FOCUS=Left sync: dopusrt /CMD Select ALL sync: dopusrt /CMD Copy UPDATEALL WHENEXISTS=replace FORCE

NOTE: The OPENINRIGHT option will cause issues if you do not type the PATH option prior to specifying the path. Ordinarily, the PATH option itself does not need to be typed. However, OPENINRIGHT accepts options parameters which complicates the issue.

So the button above will open "E:\Customers" on the left, and "F:\Backups\Customers" on the right. the button forces the left lister pane to both have focus and be the source. Then is selects all files. The copy command will only copy files that are different (do not exist, have a different size or a different date and time stamp). The WHENEXISTS=replace and FORCE options suppress all prompting set in Preferences.

NOTE: "Different" does not mean "Newer".

Is there a reason why you have to navigate to the source and destination folders?

You should be able to specify both in the Copy command directly, making the whole thing a single-line command without the need for dopusrt and sync.

Or was that tried unsuccessfully?

Thanks for the help guys. The single line was the easy answer. As for the reason, I took a left turn at "don't go this way" and ended up in "Now you're lost land." :blush: