* Keeping Date Modified? @ 2021-08-03 8:24 Radish Records [not found] ` <19cdc731-930e-4717-a0af-078bb9b4ad42n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Radish Records @ 2021-08-03 8:24 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 747 bytes --] 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 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/19cdc731-930e-4717-a0af-078bb9b4ad42n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 1099 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <19cdc731-930e-4717-a0af-078bb9b4ad42n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Keeping Date Modified? [not found] ` <19cdc731-930e-4717-a0af-078bb9b4ad42n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2021-08-03 11:02 ` Bastien DUMONT 2021-08-03 13:06 ` Radish Records 0 siblings, 1 reply; 3+ messages in thread From: Bastien DUMONT @ 2021-08-03 11:02 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw 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. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Keeping Date Modified? 2021-08-03 11:02 ` Bastien DUMONT @ 2021-08-03 13:06 ` Radish Records 0 siblings, 0 replies; 3+ messages in thread From: Radish Records @ 2021-08-03 13:06 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 2087 bytes --] 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.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-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. > > > > References: > > > > [1] mailto:pandoc-discus...-/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/81e20ff2-d1af-4472-acc2-46d444c25fd4n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 4098 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-03 13:06 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-08-03 8:24 Keeping Date Modified? Radish Records [not found] ` <19cdc731-930e-4717-a0af-078bb9b4ad42n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2021-08-03 11:02 ` Bastien DUMONT 2021-08-03 13:06 ` Radish Records
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).