From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28965 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Radish Records Newsgroups: gmane.text.pandoc Subject: Re: Keeping Date Modified? Date: Tue, 3 Aug 2021 06:06:17 -0700 (PDT) Message-ID: <81e20ff2-d1af-4472-acc2-46d444c25fd4n@googlegroups.com> References: <19cdc731-930e-4717-a0af-078bb9b4ad42n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_8520_609050649.1627995977985" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4511"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDQNHYMW6YIRBS76USEAMGQEQIT5UCQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Aug 03 15:06:23 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f183.google.com ([209.85.167.183]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mAu7h-0000sJ-95 for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 03 Aug 2021 15:06:21 +0200 Original-Received: by mail-oi1-f183.google.com with SMTP id y18-20020a0568081312b029025c79c4ad56sf8562311oiv.3 for ; Tue, 03 Aug 2021 06:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=2RKSKA+uEsqNy9VJs4pj0FdTihLZGYjuhf+MBhq1En0=; b=FPiBa4XnBEI0Rsj+D00ihoyyOJx2CxIYGs5C1sEe06n+lSv8c9AUDSBX8U/bVQtPTn j7xEeb7QDJInGjrgYl0ORVN5X9CbfGvmHsnnlN3qZFoQUiThtjU62RmjzZYjTTvDp23c czUrVep8reg3GF58AIsmuMVMjK35iN8k8H/dhlUXlvgoR5E8C1Uz6/WeeiiN+JXtLf3S fX0GnWOLpsSHG/MXJ3Vsy4+B6w6kflBl1tWNB+r2aFU3JcuTdnq1yGYdM2Lb07adUBwS nAns5bPyjwAOhiFWaSwcxEdWFhS6Mr11xmuEJAfuCOJbdqYGVjgLcjUiET+zsg1wi2pg UOUQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=2RKSKA+uEsqNy9VJs4pj0FdTihLZGYjuhf+MBhq1En0=; b=V9kYaCrVNhL+pD4FMIvtSeR1W0YqQkL21cdKeu3A6g3ISMJof+ZAu2TT3bI7uEU9P7 wJJSd05VoVvrSr3y4hCW1+pMnsyj1PebDRv4qIG8exmnCXIlCmewDvwXkH2ZdwAP7Y+J 4fJZsU4kENZTgkQAaCH1nIiUZ06f4yCVrRN/tTd7mnyOJ9INJV4CinsFvZWOG0Wlzk1d LE1jxJGUKIy35xWRjkkNuewcWYJvF5HYSO2RCiMd2WXZvSKzzPvT/pVh5ycgcZlOdhMb YfpGTJHmu6QS3jFJkAXAnjeBbVe7R1cp0R24Ncfw+uC2crNcPqhpEDabzwpvSFIrQ2UR fWHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=2RKSKA+uEsqNy9VJs4pj0FdTihLZGYjuhf+MBhq1En0=; b=C5CDrXPA+ahtGfcnk8w8bhTf/gtdExDzwfzUGmis/L5EMV+Y2bMbLR+koGyNpyBhJS IYTNocrG7hBev3JZKX1VdI3dtRAyRLFHb7qE43NfH6U0QWn/4R2C7BzdMejqMg5tqizs Y9cKDGARYS/y6Qj/7FyprUad08lKtnxhQs8X0zImYBD3BAfIqkRja1vWTkxPdp6jEKRs 5i1jUaFHefBdqqPgRpNTIrpvLMkPyU4pMgPyqq/AoE5vdVhyjB7e/RNuy4SMZX40mENy rPGus63mhfkgvccmtJrBnSe45RpS9G0QrF7x9bVIFt34nz7rco9LygeCE84+ZN52Ypq+ m4lA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5322EYdE5u5bEJ9mpdjmi9Tps96Z+m8nNn+8nASp4WS2/FiKlMP8 608WQLQBMqM+/nTE9D6Ra+Y= X-Google-Smtp-Source: ABdhPJyEqCCsJEYANtxNJCi41V9Wn8V32t+EG9S255oUZ/vzqoorknukuJJAg2hwktZhjLvv9DlMhA== X-Received: by 2002:a05:6830:1390:: with SMTP id d16mr16169768otq.31.1627995980243; Tue, 03 Aug 2021 06:06:20 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:201d:: with SMTP id q29ls592892oiw.7.gmail; Tue, 03 Aug 2021 06:06:18 -0700 (PDT) X-Received: by 2002:aca:1206:: with SMTP id 6mr14392621ois.148.1627995978658; Tue, 03 Aug 2021 06:06:18 -0700 (PDT) In-Reply-To: X-Original-Sender: maxhii2004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:28965 Archived-At: ------=_Part_8520_609050649.1627995977985 Content-Type: multipart/alternative; boundary="----=_Part_8521_415254607.1627995977985" ------=_Part_8521_415254607.1627995977985 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It works! Thanks a ton.=20 On Tuesday, August 3, 2021 at 7:03:46 PM UTC+8 Bastien Dumont wrote: > As indicated here ( > https://docs.microsoft.com/en-us/dotnet/api/system.io.fileinfo), the=20 > FileInfo class has a modifiable LastWriteTime property, so this should wo= rk: > > gci -r -i *.docx |foreach{$docxtitle=3D$_.basename+".docx";=20 > $txttitle=3D$_.basename+".txt" ; $lastwritetime=3D$_.lastwritetime ; pand= oc -s=20 > $docxtitle -o $txttitle ; (gci $txttitle).lastwritetime=3D$lastwritetime} > > Le Tuesday 03 August 2021 =C3=A0 01:24:48AM, Radish Records a =C3=A9crit = : > > I'm using=20 > >=20 > > gci -r -i *.docx |foreach{$title=3D$_.basename+".docx"; pandoc -s $titl= e -o > > $title+".txt"} > >=20 > > in powershell to convert 600~ documents into txt format. However it=20 > changes the > > last modified date to the moment i run the script.=20 > > I need the last modified date to stay the same for organisation=20 > purposes, how > > do i go about this?=20 > >=20 > > -- > > You received this message because you are subscribed to the Google Grou= ps > > "pandoc-discuss" group. > > To unsubscribe from this group and stop receiving emails from it, send= =20 > an email > > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [2] > https://groups.google.com/d/msgid/ > > pandoc-discuss/19cdc731-930e-4717-a0af-078bb9b4ad42n%40googlegroups.com= . > >=20 > > References: > >=20 > > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [2]=20 > https://groups.google.com/d/msgid/pandoc-discuss/19cdc731-930e-4717-a0af-= 078bb9b4ad42n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter > > --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/81e20ff2-d1af-4472-acc2-46d444c25fd4n%40googlegroups.com. ------=_Part_8521_415254607.1627995977985 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It works! Thanks a ton. 

On Tuesday, August 3, 2021 at 7:03:46 PM UTC+8 = Bastien Dumont wrote:
As indicated here (https://docs.mi= crosoft.com/en-us/dotnet/api/system.io.fileinfo), the FileInfo class ha= s a modifiable LastWriteTime property, so this should work:

gci -r -i *.docx |foreach{$docxtitle=3D$_.basename+".docx"; $= txttitle=3D$_.basename+".txt" ; $lastwritetime=3D$_.lastwritetime= ; pandoc -s $docxtitle -o $txttitle ; (gci $txttitle).lastwritetime=3D$las= twritetime}

Le Tuesday 03 August 2021 =C3=A0 01:24:48AM, Radish Records a =C3=A9cri= t :
> I'm using=20
>=20
> gci -r -i *.docx |foreach{$title=3D$_.basename+".docx"; = pandoc -s $title -o
> $title+".txt"}
>=20
> in powershell to convert 600~ documents into txt format. However i= t changes the
> last modified date to the moment i run the script.=20
> I need the last modified date to stay the same for organisation pu= rposes, how
> do i go about this?=20
>=20
> --
> You received this message because you are subscribed to the Google= Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, = send an email
> to [1]pandoc-discus...@= googlegroups.com.
> To view this discussion on the web visit [2]https://groups.google.com/d/msgid/
> pandoc-discuss/19cdc731-930e-4717-a0af-078bb9b4ad42n%40googlegroups.com.
>=20
> References:
>=20
> [1] mailto:pandoc-discu= s...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [2] https://= groups.google.com/d/msgid/pandoc-discuss/19cdc731-930e-4717-a0af-078bb9b4ad= 42n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/81e20ff2-d1af-4472-acc2-46d444c25fd4n%40googlegroups.= com.
------=_Part_8521_415254607.1627995977985-- ------=_Part_8520_609050649.1627995977985--