DonationCoder.com Software > Finished Programs
DONE: Create Folder, Give It Name: Current Date and Time
nkormanik:
If one puts the entire error message into a Google search, gets a ton of hits.
But no one seems to have a definitive answer.
I'm in the perplexing situation now where I've implemented a bunch of the suggestions out there -- none worked -- and now I'm wondering if I should regress to a backup I made just prior to the said implementations.
Go figure.
4wd:
I found it just stopped doing it for some reason, whether it was an update or something I installed who knows.
IainB:
@4wd:
I found it just stopped doing it for some reason, whether it was an update or something I installed who knows.
-4wd (October 24, 2018, 07:34 PM)
--- End quote ---
Ruddy heck. I'd speculate that the cause was likely to be the Registry settings had been zapped (changed/deleted) by a Windows update.
Pity. That was a nifty fix too. :Thmbsup:
What to do? Presumably reinstall as at 4wd Reply #1 on: 2018-10-17, 22:06:42 ยป?
You'd never know if/when it had been zapped again though. Might need to do that reinstall each time prior to running the thing (or as a default part of running it) every time, just in case. Belts-and-braces.
nkormanik:
Regarding the original question above, I discovered (i.e., Google search) that 4wd's PowerShell script also works by calling from a batch file.
Place the two below together into the same fixed folder:
New Folder Date Time.bat:
@ECHO OFF
PowerShell.exe -Command "& '%~dpn0.ps1'"
New Folder Date Time.ps1:
$folderName = (Get-Date).tostring("yyyy-MM-dd hh-mm-ss")
New-Item -itemType Directory -Path "C:\0_SAS_1" -Name $FolderName
In the registry "command" space place the "path+New Folder Date Time.bat":
[HKEY_CLASSES_ROOT\Directory\Background\shell\Create Date-Time Folder\command]
@="\"C:\\Windows System Tools\\0 Create Date-Time Folder\\New Folder Date Time.bat\""
From handy context menu in folder background. Easy peasy. And no rude error message.
The only remaining fly-in-the-ointment is the specific location where the new date-time folder is created. In the case above, it's bolded: C:\0_SAS_1. Only works with respect to that one folder location. Would greatly prefer that it work in ANY folder background, and create the new date-time folder in that folder.
But, at least....
nkormanik:
By the way, I ended up regressing to back-up. All the "fixing" screwed the pooch. Clear anomalies. As said, no definitive answers.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version