Ok. Great. I would just patch my own version, but I know you've already 
made changes to yours. So I'll describe what to do next. Since
we need the new naming routine twice, and maybe more, I've put it in a 
function.

Up above the RUN INFO section, paste in a new function:

# MAKE ARCHIVE STRING FROM DATE, STEM, AND EXTEN
function generate-archivestring {
    param( [datetime]$dt, [string]$pStem, [string]$pExten)
             return  "$pStem-$pExten-$(get-date -year $dt.year -month 
$dt.month -day $dt.day -hour $dt.hour -minute $dt.minute -second $dt.second 
-millisecond $dt.millisecond -f yyyy-MM-dd_HHmmss).$pExten"
}

Comment out the line that starts

$dt = ...

Comment out the the first line that starts

$archiveFilename = ....

and paste in 

$archiveFilename = generate-archivestring $destinationTimestamp $stem 
$exten   

Find the next line (down in the zip dir section) that starts with

$archiveFilename = ...

and comment it out. Paste in

$archiveFilename = generate-archivestring $destinationTimestamp $stem "zip" 

Hopefully this all makes sense. 

Thanks!



On Wednesday, July 31, 2019 at 4:51:25 AM UTC-7, @TiddlyTweeter wrote:
>
> Ciao Mark S.
>
> These are changes I made ...
>
> [image: Annotation 2019-07-31 131804.jpg]
>
>
> Its working for Backups. Great!
>
> Its also creating zip archives but unstamped like ...
>
> tricky-polly-.zip
>
> And throws big error for them during creation, as you said it would.
>
> Best
> TT
>
> On Wednesday, 31 July 2019 01:17:18 UTC+2, Mark S. wrote:
>>
>> It's just that PS should be interpreting dates in local format. But I see 
>> that the day is in M/D/Y format, which
>> isn't the default for Italy or GB. Hmmm ... was it *always *an Italian 
>> computer, or was it something else once upon a time?
>>
>> Oh well. Since it doesn't break for me, you'll need to tell me if this 
>> fix works. It's just for the standard backup dir at the moment.
>>
>> Find the line
>>
>>       $destinationTimestamp = $destination.LastWriteTime
>>
>> and insert below it the new line:
>>
>>       $dt = $destinationTimestamp 
>>
>> Then down below that find the first line that starts 
>>
>>       $archiveFilename = ...
>>
>> And replace it with:
>>
>>         $archiveFilename = "$stem-$exten-$(get-date -year $dt.year -month 
>> $dt.month -day $dt.day -hour $dt.hour -minute $dt.minute -second $dt.second 
>> -millisecond $dt.millisecond -f yyyy-MM-dd_HHmmss).$exten"
>>
>> I don't know how GG will format this, but it apparently needs to be all 
>> one line. 
>>
>> Now when you test it, if the fix works there should be half as many 
>> errors (because there will still be errors from the zip backup).
>>
>> Let me know!
>> Thanks!
>>
>>
>>
>> On Tuesday, July 30, 2019 at 11:25:48 AM UTC-7, @TiddlyTweeter wrote:
>>>
>>> Unfortunately I changed nothing. 
>>>
>>> Other than my computer is Italian.
>>>
>>> TT
>>>
>>> On Tuesday, 30 July 2019 20:00:03 UTC+2, Mark S. wrote:
>>>>
>>>> Well drat. I should have known that was too easy.
>>>>
>>>> Though yes, it is probably "you". I'm guessing that you've done 
>>>> something somewhere to change your own local (locale?) date format string.
>>>> Do you recall making some setting to that effect? And/or changing 
>>>> locale?
>>>>
>>>> Not that you should have to change, just curious if my theory is right.
>>>>
>>>> On Tuesday, July 30, 2019 at 8:58:43 AM UTC-7, @TiddlyTweeter wrote:
>>>>>
>>>>> Ciao Mark
>>>>>
>>>>> Both via test and running your latest directly I get this error ...
>>>>>
>>>>> [image: Annotation 2019-07-30 175447.jpg]
>>>>>
>>>>> Yours in hope it may be ME.
>>>>>
>>>>> TT
>>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0886b335-098c-4cc4-956d-46a3312fe111%40googlegroups.com.

Reply via email to