I would like the option that when I use New Folder that the default name of the folder be a date/time stamp of the format CCYYMMDD.HHMMSS.DAY.
This could be an real option in Preferences -> Miscellaneous -> Advanced -> default new folder name with a lovely strftime like format: %Y%m%d.%H%M%S.%a
It could, of course, default to New Folder like it currently does, so that it has minimal impact on current functionality.
How I got here in the first place.
One of my pet peeves is directories called bak or backup or files renamed to something.bak. Backups should really be timestamped. Instead of file.txt becoming file.bak, it should be file.20131027.143015.Sun.txt. If I create a backup directory, it is usually called Backup\20131027.143112.Sun. This avoids all the problems with the next time you want to back up the same file or directory and also keeps an obvious indication as to when it was done.
I was pleasantly surprised that I could almost do this in dopus already.
Settings -> Customize... -> Commands tab -> Add new User Command...
Name: CreateDateTimeFolder
Lable: Create DateTime Folder
Tip: Create DateTime Folder
Function: MS-Dos Batch Function
Code:
[code]@runmode:hide
@useactivelister
@echo off
setlocal EnableExtensions
setlocal EnableDelayedExpansion
for /F "tokens=1-8 delims=/:. " %%a in ('echo %date% %time: =0%') do set datetime=%%d%%c%%b.%%e%%f%%g.%%a
mkdir %datetime%[/code]
Add this command to the context menu and you are there! ... almost.
The problem is that to execute this command, dopus creates a temporary bat file. This sets off all sorts of alarms in paranoid virus checkers and overly zealous firewalls.
[quote]echo.exe was allowed to be executed previously. However a new parent application dop201310270421120242.bat is detected and could not be recognised. Once the application is executed, its parent will have the full controls over its exectution...[/quote]
On my PC, it brings up 3 separate warnings with a time delay in between each one. This somewhat ruins the fun of the user created command.
I can allow this bat file full privileges, but dopus will make a new bat file each time, so that is no use.
Suggestion 2: Is it possible to cache custom user bat files and reuse them if they have not changed (and used no parameters)?
This way if I allow an exception in my firewall/antivirus, I can happily use that command until the next reinstall.
If it is unknowable whether you can or can't reuse the existing bat file, maybe you can have a checkbox for each one that says it is OK to reuse or has no parameters or something?
Thanks,
Null
You can do this purely with Opus internal commands (and in fact the command is pre-defined in the default toolbars - click the drop-down attached to the New Folder button and choose New Dated Folder):
I'm still surprised how often people insist on extending the already massive set of options to include a prefs option for something that is very easily achieved using Opus' extensive customization features.
For instance, if you still want a dialog along with the date based name for the new folder, you could alter Jon's example to something like:
CreateFolder NAME="{dlgstring|Enter the name of the folder you want to create:|{date|yyyy-MM-dd} {time|HH-mm-ss}}"
...so given that you can control exactly how your 'New Folder' buttons or hotkeys behave through customization, what would an option in Prefs do for you that you can't already do for yourself? It's not an argument of a retort, I'm honestly just curious.
For your second question, it seems that you got there as a result of thinking you needed to use some temporary batch file to achieve your goal in the first question. But to this question I ask: can't you simply exclude the dopus process from either or both of your AV and firewall apps? I thought all the temp batch files Opus' generates runs under it's host process and should be easy to exclude by any third party security app worth 10 cents...? What you're asking for here would require Opus to always be remembering what content it's sticking into temp files in order to know if it can re-use a previous temp batch file. Seems unnecessary overhead and a kludged hack of something that is intentionally "temporary" just to get around a behavior that should more properly be controlled at the app layer that's yelling at you (again, i.e - exclusion lists in your security apps). Again, not intending to stoke an argument, just another users opinion...
I have been a Opus user for years, but that massive set of options you talk about still takes a long time to master.
In this case, I just simply didn't know what was possible or how to do it.
Well, I didn't use a temporary batch file, Opus generated it.
I did. But the Opus generated bat file was seen as something new and it flagged it.
Well mine wasn't even that expensive! But I am sure the reason is that I have set the most paranoid options available. I like it that way.
I was just suggesting that Opus keep track of (or cache) the bat files it generated.
I can see myself using the DOS batch hook for a lot of things, but I won't if it means fighting the firewalls/antivirus at home and work (where I have no control of the options) all the time.
You have shown me that more things are possible directly in Opus, and that is a good thing indeed. I will be trying hard to use that in the future.
Caching the temp bat files would not solve the problem anyway, except in such a narrow range of situations that it would be next to pointless (and probably more confusing than useful, as it would behave one way most of the time, and another some of the time, even assuming the added complexity it would add to our code didn't result in unexpected bugs that everyone would suffer for so little benefit).
The bat files contain lines to CD to the current directory and usually contain selected file paths/names etc. as well as the commands themselves.
So unless you were running the exact same command, on the exact same files, in the exact same directory, it would not make any difference if Opus cached the bat files or not.
(If you do have static bat scripts that you want to run lots of times, put them in normal .bat files under, say, /dopusdata/Scripts, then have a normal (non-batch) Opus button run the .bat file. Then the same .bat file will be used every time.)
Even in that unusual case where the same bat file was used multiple times, you might ask why the antivirus tool is prompting twice for the same thing and not caching the result. The antivirus tool is the thing getting in the way, so it's up to it to do that in the least problematic way possible. If you're going to ask for a change in anything because of this behaviour, it should be the antivirus tool.
(I'm not sure I see what the A/V tool is trying to prevent anyway. If something is able to write a list of commands into a temp file and then execute that temp file, it could just as easily execute the list of commands directly itself. Blocking the bat file is shutting the stable doors after the horse has bolted.)