Page 1 of 1

Some Date Variables Added on v7.10.0015 not Working

Posted: 20 May 2008 18:32
by Lare2
Seems that three of the Date Variables added on v7.10.0015 are not working. Unless i've been doing something wrong

1

Code: Select all

rename , <srcdatem yyyymmdd_hhnnss>   // modified date of source item
2

Code: Select all

rename , <srcdatec yyyymmdd_hhnnss>   // created date of source item
3

Code: Select all

rename , <srcdatea yyyymmdd_hhnnss>   // accessed date of source item
The other fours seems to be working OK :D

Re: Some Date Variables Added on v7.10.0015 not Working

Posted: 20 May 2008 19:34
by admin
Oh yes, I have a little extra work to do there...

Re: Some Date Variables Added on v7.10.0015 not Working

Posted: 21 May 2008 15:46
by admin
admin wrote:Oh yes, I have a little extra work to do there...
Should work now. But use the <date...> versions, not the <srcdate...> ones.

Posted: 22 May 2008 07:38
by Lare2
Edit See Below :(

Posted: 22 May 2008 07:57
by Lare2
It appears that it's not working as expected.

when i use the variable

Code: Select all

<datec yyyymmdd_hhnnss>     : created date of renamed item
to rename several files, it appears to be appending the created date of the last selected item to all of them.

try the following.

1.- Highlight some files with different created dates to rename
2.- Run the following script

Code: Select all

rename , <datec yyyymmdd_hhnnss> <#01> /s
and see the results

Image

Posted: 22 May 2008 08:10
by admin
Lare2 wrote:It appears that it's not working as expected.

when i use the variable

Code: Select all

<datec yyyymmdd_hhnnss>     : created date of renamed item
to rename several files, it appears to be appending the created date of the last selected item to all of them.

try the following.

1.- Highlight some files with different created dates to rename
2.- Run the following script

Code: Select all

rename , <datec yyyymmdd_hhnnss> <#01> /s
and see the results

Image
Ah yes, actually it looks like date variables never worked as expected in scripting! They always retrieved the date of the currently focused item.

It does work from a UDC however.

I have to think about this...

Posted: 22 May 2008 19:32
by admin
admin wrote:I have to think about this...
Okay, thinking done. Should work as expected in next version.

Posted: 23 May 2008 04:04
by Lare2
admin wrote:
admin wrote:I have to think about this...
Okay, thinking done. Should work as expected in next version.
Indeed it works right when used under the "Rename" UDC Category. It seems the problem it's only when used inside a script.

For now i have to use it only that way.

Posted: 23 May 2008 07:32
by admin
Lare2 wrote:
admin wrote:
admin wrote:I have to think about this...
Okay, thinking done. Should work as expected in next version.
Indeed it works right when used under the "Rename" UDC Category. It seems the problem it's only when used inside a script.

For now i have to use it only that way.
Here's the simple explanation:

Code: Select all

    ! Batch Rename: Using date variables in Scripting over more than one 
      selected files at once did not work as expected because the 
      variables in the pattern argument were resolved *before* passing 
      the pattern to the rename procedure. Fixed.
Anyway, it will work in 0018.

Posted: 23 May 2008 21:08
by Lare2
It works perfect now. :D