ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: Change (sub) folder(s) date based on newest/oldest file in the folder

<< < (22/32) > >>

dcwul62:
Tried the version for v10

got this error

//
Successfully initialized 'vbscript' engine
Script started successfully
Error at line 90, position 3
Kan het pad niet vinden  (unable to locate path)
Script error - script aborted
//

Installed v11 beta 7
created a new button
pasted your v11 code in it.

did not work
=


=

=
Capture-13022014 153139.png (129.2 kB. 425x308 - viewed 1774 times.)
Capture-13022014 153205.png (69.39 kB. 518x135 - viewed 1654 times.)

=

4wd:
pasted your v11 code in it.-dcwul62 (February 13, 2014, 08:37 AM)
--- End quote ---

First off, the V11 version as I posted it, does not contain the line: Rename "*" TO "*"
Your attached version does.

Secondly, are you setting the new button to Script Function as shown here for the SetFolDateFM script I posted.

The script has been tested in DOpus x64 v11b6 and b7, on Win8.1 x64 and XP x86.

Button code is attached - open it in a text editor, copy the text, then paste it into a toolbar while the Customise dialog is open, (right-click on a toolbar, paste).

I'll have a look at the DO10 version later but it worked OK in a VM running XP x86 and DOpus 10.5.4.0

EDIT: The DO10 version works fine on XP Pro SP3 x86 (both VM and real) and WHS2011 x64 using DOpus 10.5.4.0


With the RegEx rename commands you're using, you could replace all four with:

Create Filenamed Folder to MOVE to...
Rename REGEXP PATTERN "(.*?)(?:([-\s]\d{2}).*|\.\w+)$" TO \1\\\0
Select ALLDIRS
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile}

(.*?)(?:([-\s]\d{2}).*|\.\w+)$   Match everything up until the first occurrence of two digits or the extension, whichever comes first, but don't capture what follows.

An example:



So if you put that RegEx into the script back here, you could select every file and hit the button.

BTW, here's an online RegEx tester that's compatible with DOpus' version, (TR1 ECMAScript): RegExr
Here's the above expression sans leading capture group.

dcwul62:
Thanks for all.
I feel verrry sorry to say, but I am a bit lost now...
Got a bit confused.

1. I have installed DO v11b7 x64

2. This is in my F:\Directory Opus folder:
=

=

3. I have deleted the toolbar-button

4. Ini-file reads
[General]
Recurse=True
Age=1
DateLimit=False
IncFolders=True
FileDate=0
[Folder]
Modified=True
Created=False
Accessed=False

5.SetFolDate.exe is v0.3.1.4 (latest version)

==

Now, from here, so, more or less from scratch, what do I need to do ?

Thanks again!

p.s. I know about the regexr and all, but find-replace are limited to filenames only.
I have not found any tools that can modify folderdates based on dates in the foldernames.


4wd:
There were three parts to my previous post, I'll start from the last.

First things first - refer to this post by you.

... but find-replace are limited to filenames only.-dcwul62 (February 14, 2014, 12:32 AM)
--- End quote ---

I never said it wasn't.

I have not found any tools that can modify folderdates based on dates in the foldernames.
--- End quote ---

I never said that's what it did or that there was.

What I did say was you could replace the four RegEx commands you use now with just one - or in pictures:

Current:
DONE: Change (sub) folder(s) date based on newest/oldest file in the folder

Replacement:
DONE: Change (sub) folder(s) date based on newest/oldest file in the folder

Thus the four RegEx commands you use now could be replaced by just one, ie. from this:

1st regex: Create Filenamed Folder to MOVE to... (Date+Time)
Rename REGEXP PATTERN "(.+)(-|\s)(\d{6}|\d{8}|\d{2}-\d{2}-\d{4})(-|\s)(\d{6})\.(.+)" TO \1\\\0
Select ALLDIRS
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile}

2nd regex: Create Filenamed Folder to MOVE to... (##-Date+Time)
Rename REGEXP PATTERN "(.+)(-|\s)(\d{2}|\d{3})(-|\s)(\d{6}|\d{8}|\d{2}-\d{2}-\d{4})(-|\s)(\d{6})\.(.+)" TO \1\\\0
Select ALLDIRS
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile}

3rd regex: Create Filenamed Folder to MOVE to... (Date Only)
Rename REGEXP PATTERN "(.+)(-|\s)(\d{6}|\d{8}|\d{2}-\d{2}-\d{4})\.(.+)" TO \1\\\0
Select ALLDIRS
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile}

4th regex: Create Filenamed Folder to MOVE to... (##-Date Only)
Rename REGEXP PATTERN "(.+)(-|\s)(\d{2}|\d{3})(-|\s)(\d{6}|\d{8}|\d{2}-\d{2}-\d{4})\.(.+)" TO \1\\\0
Select ALLDIRS
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile}
--- End quote ---

To this:

Create Filenamed Folder to MOVE to...
Rename REGEXP PATTERN "(.*?)(?:([-\s]\d{2}).*|\.\w+)$" TO \1\\\0
Select ALLDIRS
"F:\Directory Opus\SetFolDateFM.exe" /r {ss} {allfile}

It covers the formats you stated:

Files with:
date-time
seq.nbr-date-time
date  only
seq.nbr-date

Plus files without the above, ie. files with just an extension.

I'll go away and do some pictures for the next item on the agenda :)

4wd:
Continuing on with the SetFolDateFM script which carries on from the previous post, (as in "So if you put that RegEx into the script back here, you could select every file and hit the button.").


* Download the attached button for DOpus, (BTW, at this point I'm only going to deal with DOpus 11).
* Extract and open the XML file in notepad, Select All, then Copy.
DONE: Change (sub) folder(s) date based on newest/oldest file in the folder


* Open the Customise dialog in a DOpus lister.
DONE: Change (sub) folder(s) date based on newest/oldest file in the folder


* Right-click on a toolbar and select Paste.
DONE: Change (sub) folder(s) date based on newest/oldest file in the folder


* Bingo!  A new button.
DONE: Change (sub) folder(s) date based on newest/oldest file in the folder


* Double-click on the button and then edit the script so that it has the correct path to SetFolDateFM.exe
DONE: Change (sub) folder(s) date based on newest/oldest file in the folder


* OK out of the Button Editor and the Customise dialog.
* Select some files, the script is using the RegEx from my previous post (.*?)(?:([-\s]\d{2}).*|\.\w+)$ - so you can select all your files.  It doesn't matter if some have date+time, seq+date+time, date, seq+date, or no date+time.
* Press the button.
DONE: Change (sub) folder(s) date based on newest/oldest file in the folder


* The result, (it's copying the files' MODIFIED date/time to the newly created folders CREATED and MODIFIED date/time - because that's what SetFolDateFM.ini is set for).
DONE: Change (sub) folder(s) date based on newest/oldest file in the folder

Try it on some test files first.  In theory, one button just replaced your four Drag'n'Drop menu items.

Part 2 later.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version