public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Keeping Date Modified?
Date: Tue,  3 Aug 2021 11:02:30 +0000	[thread overview]
Message-ID: <YQkiRkg+rRd1JBrB@localhost> (raw)
In-Reply-To: <19cdc731-930e-4717-a0af-078bb9b4ad42n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

As indicated here (https://docs.microsoft.com/en-us/dotnet/api/system.io.fileinfo), the FileInfo class has a modifiable LastWriteTime property, so this should work:

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

Le Tuesday 03 August 2021 à 01:24:48AM, Radish Records a écrit :
> I'm using 
> 
> gci -r -i *.docx |foreach{$title=$_.basename+".docx"; pandoc -s $title -o
> $title+".txt"}
> 
> in powershell to convert 600~ documents into txt format. However it changes the
> last modified date to the moment i run the script. 
> I need the last modified date to stay the same for organisation purposes, how
> do i go about this? 
> 
> --
> 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-discuss+unsubscribe-/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.
> 
> References:
> 
> [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [2] https://groups.google.com/d/msgid/pandoc-discuss/19cdc731-930e-4717-a0af-078bb9b4ad42n%40googlegroups.com?utm_medium=email&utm_source=footer

-- 
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 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/YQkiRkg%2BrRd1JBrB%40localhost.


  parent reply	other threads:[~2021-08-03 11:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03  8:24 Radish Records
     [not found] ` <19cdc731-930e-4717-a0af-078bb9b4ad42n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-03 11:02   ` Bastien DUMONT [this message]
2021-08-03 13:06     ` Radish Records

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YQkiRkg+rRd1JBrB@localhost \
    --to=bastien.dumont-vwifzpto/vqstnjn9+bgxg@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).