Youtube-DL: Date Modified












0















Using PowerShell on Windows I'm downloading a channel similar to this:



youtube-dl.exe `
--format 18 `
--continue `
--ignore-errors `
--no-overwrites `
--add-metadata `
--xattrs `
-o "\srvdsMediaYoutubeChannel%(upload_date)s.%(title)s.%(ext)s" `
https://www.youtube.com/user/Channel


Is there a way to change the file-modified date to match the date of the file upload date/time inside Youtube-DL?










share|improve this question



























    0















    Using PowerShell on Windows I'm downloading a channel similar to this:



    youtube-dl.exe `
    --format 18 `
    --continue `
    --ignore-errors `
    --no-overwrites `
    --add-metadata `
    --xattrs `
    -o "\srvdsMediaYoutubeChannel%(upload_date)s.%(title)s.%(ext)s" `
    https://www.youtube.com/user/Channel


    Is there a way to change the file-modified date to match the date of the file upload date/time inside Youtube-DL?










    share|improve this question

























      0












      0








      0








      Using PowerShell on Windows I'm downloading a channel similar to this:



      youtube-dl.exe `
      --format 18 `
      --continue `
      --ignore-errors `
      --no-overwrites `
      --add-metadata `
      --xattrs `
      -o "\srvdsMediaYoutubeChannel%(upload_date)s.%(title)s.%(ext)s" `
      https://www.youtube.com/user/Channel


      Is there a way to change the file-modified date to match the date of the file upload date/time inside Youtube-DL?










      share|improve this question














      Using PowerShell on Windows I'm downloading a channel similar to this:



      youtube-dl.exe `
      --format 18 `
      --continue `
      --ignore-errors `
      --no-overwrites `
      --add-metadata `
      --xattrs `
      -o "\srvdsMediaYoutubeChannel%(upload_date)s.%(title)s.%(ext)s" `
      https://www.youtube.com/user/Channel


      Is there a way to change the file-modified date to match the date of the file upload date/time inside Youtube-DL?







      powershell youtube-dl






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 27 '18 at 4:17









      WernerCDWernerCD

      3,55062639




      3,55062639






















          1 Answer
          1






          active

          oldest

          votes


















          1














          If you mean using that tool, I have no idea. Yet, easily done using PowerShell, and there are examples of messing with times stamps all over the web.



          For Example, a simple search using...




          powershell change file modified date




          … yields …




          Use PowerShell to Modify File Access Time Stamps
          https://blogs.technet.microsoft.com/heyscriptingguy/2012/06/01/use-powershell-to-modify-file-access-time-stamps




          Set-FileTimeStamps function

          Function Set-FileTimeStamps

          {

          Param
          (
          [Parameter(mandatory=$true)]
          [string]$path,
          [datetime]$date = (Get-Date)
          )

          Get-ChildItem -Path $path |

          ForEach-Object
          {
          $_.CreationTime = $date
          $_.LastAccessTime = $date
          $_.LastWriteTime = $date }
          }



          #42 : How to change modified date of file using Powershell?
          http://powershell-tips.blogspot.com/2012/10/how-to-change-modified-date-of-file.html

          ls | where { $_.Name -eq "webcam-toy-photo2.jpg" } | foreach { $_.LastWriteTime="9/23/1942 10:10 PM" }





          share|improve this answer
























          • Yeah, the goal was to do it in one pass with youtube-dl - pull file and use the "posted datetime" as the modified date. There are some hidden magics in console apps like it and figured I'd ask before I delved into PowerShell'y ways of doing it. I guess the question and tag does need a bit more clarification.

            – WernerCD
            Dec 27 '18 at 18:33













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1388007%2fyoutube-dl-date-modified%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          If you mean using that tool, I have no idea. Yet, easily done using PowerShell, and there are examples of messing with times stamps all over the web.



          For Example, a simple search using...




          powershell change file modified date




          … yields …




          Use PowerShell to Modify File Access Time Stamps
          https://blogs.technet.microsoft.com/heyscriptingguy/2012/06/01/use-powershell-to-modify-file-access-time-stamps




          Set-FileTimeStamps function

          Function Set-FileTimeStamps

          {

          Param
          (
          [Parameter(mandatory=$true)]
          [string]$path,
          [datetime]$date = (Get-Date)
          )

          Get-ChildItem -Path $path |

          ForEach-Object
          {
          $_.CreationTime = $date
          $_.LastAccessTime = $date
          $_.LastWriteTime = $date }
          }



          #42 : How to change modified date of file using Powershell?
          http://powershell-tips.blogspot.com/2012/10/how-to-change-modified-date-of-file.html

          ls | where { $_.Name -eq "webcam-toy-photo2.jpg" } | foreach { $_.LastWriteTime="9/23/1942 10:10 PM" }





          share|improve this answer
























          • Yeah, the goal was to do it in one pass with youtube-dl - pull file and use the "posted datetime" as the modified date. There are some hidden magics in console apps like it and figured I'd ask before I delved into PowerShell'y ways of doing it. I guess the question and tag does need a bit more clarification.

            – WernerCD
            Dec 27 '18 at 18:33


















          1














          If you mean using that tool, I have no idea. Yet, easily done using PowerShell, and there are examples of messing with times stamps all over the web.



          For Example, a simple search using...




          powershell change file modified date




          … yields …




          Use PowerShell to Modify File Access Time Stamps
          https://blogs.technet.microsoft.com/heyscriptingguy/2012/06/01/use-powershell-to-modify-file-access-time-stamps




          Set-FileTimeStamps function

          Function Set-FileTimeStamps

          {

          Param
          (
          [Parameter(mandatory=$true)]
          [string]$path,
          [datetime]$date = (Get-Date)
          )

          Get-ChildItem -Path $path |

          ForEach-Object
          {
          $_.CreationTime = $date
          $_.LastAccessTime = $date
          $_.LastWriteTime = $date }
          }



          #42 : How to change modified date of file using Powershell?
          http://powershell-tips.blogspot.com/2012/10/how-to-change-modified-date-of-file.html

          ls | where { $_.Name -eq "webcam-toy-photo2.jpg" } | foreach { $_.LastWriteTime="9/23/1942 10:10 PM" }





          share|improve this answer
























          • Yeah, the goal was to do it in one pass with youtube-dl - pull file and use the "posted datetime" as the modified date. There are some hidden magics in console apps like it and figured I'd ask before I delved into PowerShell'y ways of doing it. I guess the question and tag does need a bit more clarification.

            – WernerCD
            Dec 27 '18 at 18:33
















          1












          1








          1







          If you mean using that tool, I have no idea. Yet, easily done using PowerShell, and there are examples of messing with times stamps all over the web.



          For Example, a simple search using...




          powershell change file modified date




          … yields …




          Use PowerShell to Modify File Access Time Stamps
          https://blogs.technet.microsoft.com/heyscriptingguy/2012/06/01/use-powershell-to-modify-file-access-time-stamps




          Set-FileTimeStamps function

          Function Set-FileTimeStamps

          {

          Param
          (
          [Parameter(mandatory=$true)]
          [string]$path,
          [datetime]$date = (Get-Date)
          )

          Get-ChildItem -Path $path |

          ForEach-Object
          {
          $_.CreationTime = $date
          $_.LastAccessTime = $date
          $_.LastWriteTime = $date }
          }



          #42 : How to change modified date of file using Powershell?
          http://powershell-tips.blogspot.com/2012/10/how-to-change-modified-date-of-file.html

          ls | where { $_.Name -eq "webcam-toy-photo2.jpg" } | foreach { $_.LastWriteTime="9/23/1942 10:10 PM" }





          share|improve this answer













          If you mean using that tool, I have no idea. Yet, easily done using PowerShell, and there are examples of messing with times stamps all over the web.



          For Example, a simple search using...




          powershell change file modified date




          … yields …




          Use PowerShell to Modify File Access Time Stamps
          https://blogs.technet.microsoft.com/heyscriptingguy/2012/06/01/use-powershell-to-modify-file-access-time-stamps




          Set-FileTimeStamps function

          Function Set-FileTimeStamps

          {

          Param
          (
          [Parameter(mandatory=$true)]
          [string]$path,
          [datetime]$date = (Get-Date)
          )

          Get-ChildItem -Path $path |

          ForEach-Object
          {
          $_.CreationTime = $date
          $_.LastAccessTime = $date
          $_.LastWriteTime = $date }
          }



          #42 : How to change modified date of file using Powershell?
          http://powershell-tips.blogspot.com/2012/10/how-to-change-modified-date-of-file.html

          ls | where { $_.Name -eq "webcam-toy-photo2.jpg" } | foreach { $_.LastWriteTime="9/23/1942 10:10 PM" }






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 27 '18 at 8:05









          postanotepostanote

          97833




          97833













          • Yeah, the goal was to do it in one pass with youtube-dl - pull file and use the "posted datetime" as the modified date. There are some hidden magics in console apps like it and figured I'd ask before I delved into PowerShell'y ways of doing it. I guess the question and tag does need a bit more clarification.

            – WernerCD
            Dec 27 '18 at 18:33





















          • Yeah, the goal was to do it in one pass with youtube-dl - pull file and use the "posted datetime" as the modified date. There are some hidden magics in console apps like it and figured I'd ask before I delved into PowerShell'y ways of doing it. I guess the question and tag does need a bit more clarification.

            – WernerCD
            Dec 27 '18 at 18:33



















          Yeah, the goal was to do it in one pass with youtube-dl - pull file and use the "posted datetime" as the modified date. There are some hidden magics in console apps like it and figured I'd ask before I delved into PowerShell'y ways of doing it. I guess the question and tag does need a bit more clarification.

          – WernerCD
          Dec 27 '18 at 18:33







          Yeah, the goal was to do it in one pass with youtube-dl - pull file and use the "posted datetime" as the modified date. There are some hidden magics in console apps like it and figured I'd ask before I delved into PowerShell'y ways of doing it. I guess the question and tag does need a bit more clarification.

          – WernerCD
          Dec 27 '18 at 18:33




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1388007%2fyoutube-dl-date-modified%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          If I really need a card on my start hand, how many mulligans make sense? [duplicate]

          Alcedinidae

          Can an atomic nucleus contain both particles and antiparticles? [duplicate]