{"id":1657,"date":"2018-04-24T10:16:56","date_gmt":"2018-04-24T09:16:56","guid":{"rendered":"http:\/\/samjwatkins.com\/blog\/?p=1657"},"modified":"2018-05-02T19:29:39","modified_gmt":"2018-05-02T18:29:39","slug":"words-to-the-wise","status":"publish","type":"post","link":"https:\/\/samjwatkins.com\/blog\/?p=1657","title":{"rendered":"Words to the wise &#8211; recreating Unix&#8217;s touch function in Windows"},"content":{"rendered":"<p>Creating an empty file.<\/p>\n<p>type nul &gt;&gt; your_file.txt<br \/>\ncopy \/b filename.ext +,,<\/p>\n<p><span style=\"display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;\">The following works through a set of files in a directory and refreshes the date of them.\u00a0 Useful if your company has a policy for deleting old files automatically, using P<\/span>owershell.<\/p>\n<p>(ls your-file-name-here).LastWriteTime = Get-Date<br \/>\nGet-ChildItem . * -recurse | ForEach-Object{$_.LastWriteTime = get-date}<\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/sysinternals\/downloads\/file-and-disk-utilities\">https:\/\/docs.microsoft.com\/en-us\/sysinternals\/downloads\/file-and-disk-utilities<\/a><\/p>\n<p>If you do this, it may be worth considering time stamping your files: textFile1_20180502.txt for example.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating an empty file. type nul &gt;&gt; your_file.txt copy \/b filename.ext +,, The following works through a set of files in a directory and refreshes the date of them.\u00a0 Useful if your company has a policy for deleting old files automatically, using Powershell. (ls your-file-name-here).LastWriteTime = Get-Date Get-ChildItem . * -recurse | ForEach-Object{$_.LastWriteTime = get-date} [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1657","post","type-post","status-publish","format-standard","hentry","category-forty-two"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Words to the wise - recreating Unix&#039;s touch function in Windows - Finding the chase and cutting to it<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/samjwatkins.com\/blog\/?p=1657\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Words to the wise - recreating Unix&#039;s touch function in Windows - Finding the chase and cutting to it\" \/>\n<meta property=\"og:description\" content=\"Creating an empty file. type nul &gt;&gt; your_file.txt copy \/b filename.ext +,, The following works through a set of files in a directory and refreshes the date of them.\u00a0 Useful if your company has a policy for deleting old files automatically, using Powershell. (ls your-file-name-here).LastWriteTime = Get-Date Get-ChildItem . * -recurse | ForEach-Object{$_.LastWriteTime = get-date} [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/samjwatkins.com\/blog\/?p=1657\" \/>\n<meta property=\"og:site_name\" content=\"Finding the chase and cutting to it\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-24T09:16:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-05-02T18:29:39+00:00\" \/>\n<meta name=\"author\" content=\"Sam J Watkins\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sam J Watkins\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/?p=1657#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/?p=1657\"},\"author\":{\"name\":\"Sam J Watkins\",\"@id\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/#\\\/schema\\\/person\\\/b001c9aecccd284b29f0d69e10c68af5\"},\"headline\":\"Words to the wise &#8211; recreating Unix&#8217;s touch function in Windows\",\"datePublished\":\"2018-04-24T09:16:56+00:00\",\"dateModified\":\"2018-05-02T18:29:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/?p=1657\"},\"wordCount\":92,\"commentCount\":0,\"articleSection\":[\"42\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/?p=1657#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/?p=1657\",\"url\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/?p=1657\",\"name\":\"Words to the wise - recreating Unix's touch function in Windows - Finding the chase and cutting to it\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/#website\"},\"datePublished\":\"2018-04-24T09:16:56+00:00\",\"dateModified\":\"2018-05-02T18:29:39+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/#\\\/schema\\\/person\\\/b001c9aecccd284b29f0d69e10c68af5\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/?p=1657#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/?p=1657\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/?p=1657#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/samjwatkins.com\\\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Words to the wise &#8211; recreating Unix&#8217;s touch function in Windows\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/\",\"name\":\"Finding the chase and cutting to it\",\"description\":\"A collection of thoughts, reactions and general comment\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/#\\\/schema\\\/person\\\/b001c9aecccd284b29f0d69e10c68af5\",\"name\":\"Sam J Watkins\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0f33fed47b6bcd59c4fb4184af075e1f981651c38fd946b5cc6d4ed5ff0e18fd?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0f33fed47b6bcd59c4fb4184af075e1f981651c38fd946b5cc6d4ed5ff0e18fd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0f33fed47b6bcd59c4fb4184af075e1f981651c38fd946b5cc6d4ed5ff0e18fd?s=96&d=mm&r=g\",\"caption\":\"Sam J Watkins\"},\"description\":\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sam-watkins-6564311\\\/\",\"sameAs\":[\"http:\\\/\\\/samjwatkins.com\"],\"url\":\"https:\\\/\\\/samjwatkins.com\\\/blog\\\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Words to the wise - recreating Unix's touch function in Windows - Finding the chase and cutting to it","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/samjwatkins.com\/blog\/?p=1657","og_locale":"en_GB","og_type":"article","og_title":"Words to the wise - recreating Unix's touch function in Windows - Finding the chase and cutting to it","og_description":"Creating an empty file. type nul &gt;&gt; your_file.txt copy \/b filename.ext +,, The following works through a set of files in a directory and refreshes the date of them.\u00a0 Useful if your company has a policy for deleting old files automatically, using Powershell. (ls your-file-name-here).LastWriteTime = Get-Date Get-ChildItem . * -recurse | ForEach-Object{$_.LastWriteTime = get-date} [&hellip;]","og_url":"https:\/\/samjwatkins.com\/blog\/?p=1657","og_site_name":"Finding the chase and cutting to it","article_published_time":"2018-04-24T09:16:56+00:00","article_modified_time":"2018-05-02T18:29:39+00:00","author":"Sam J Watkins","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sam J Watkins"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/samjwatkins.com\/blog\/?p=1657#article","isPartOf":{"@id":"https:\/\/samjwatkins.com\/blog\/?p=1657"},"author":{"name":"Sam J Watkins","@id":"https:\/\/samjwatkins.com\/blog\/#\/schema\/person\/b001c9aecccd284b29f0d69e10c68af5"},"headline":"Words to the wise &#8211; recreating Unix&#8217;s touch function in Windows","datePublished":"2018-04-24T09:16:56+00:00","dateModified":"2018-05-02T18:29:39+00:00","mainEntityOfPage":{"@id":"https:\/\/samjwatkins.com\/blog\/?p=1657"},"wordCount":92,"commentCount":0,"articleSection":["42"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/samjwatkins.com\/blog\/?p=1657#respond"]}]},{"@type":"WebPage","@id":"https:\/\/samjwatkins.com\/blog\/?p=1657","url":"https:\/\/samjwatkins.com\/blog\/?p=1657","name":"Words to the wise - recreating Unix's touch function in Windows - Finding the chase and cutting to it","isPartOf":{"@id":"https:\/\/samjwatkins.com\/blog\/#website"},"datePublished":"2018-04-24T09:16:56+00:00","dateModified":"2018-05-02T18:29:39+00:00","author":{"@id":"https:\/\/samjwatkins.com\/blog\/#\/schema\/person\/b001c9aecccd284b29f0d69e10c68af5"},"breadcrumb":{"@id":"https:\/\/samjwatkins.com\/blog\/?p=1657#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/samjwatkins.com\/blog\/?p=1657"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/samjwatkins.com\/blog\/?p=1657#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/samjwatkins.com\/blog"},{"@type":"ListItem","position":2,"name":"Words to the wise &#8211; recreating Unix&#8217;s touch function in Windows"}]},{"@type":"WebSite","@id":"https:\/\/samjwatkins.com\/blog\/#website","url":"https:\/\/samjwatkins.com\/blog\/","name":"Finding the chase and cutting to it","description":"A collection of thoughts, reactions and general comment","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/samjwatkins.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/samjwatkins.com\/blog\/#\/schema\/person\/b001c9aecccd284b29f0d69e10c68af5","name":"Sam J Watkins","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/0f33fed47b6bcd59c4fb4184af075e1f981651c38fd946b5cc6d4ed5ff0e18fd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0f33fed47b6bcd59c4fb4184af075e1f981651c38fd946b5cc6d4ed5ff0e18fd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0f33fed47b6bcd59c4fb4184af075e1f981651c38fd946b5cc6d4ed5ff0e18fd?s=96&d=mm&r=g","caption":"Sam J Watkins"},"description":"https:\/\/www.linkedin.com\/in\/sam-watkins-6564311\/","sameAs":["http:\/\/samjwatkins.com"],"url":"https:\/\/samjwatkins.com\/blog\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/samjwatkins.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1657","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/samjwatkins.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/samjwatkins.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/samjwatkins.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/samjwatkins.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1657"}],"version-history":[{"count":4,"href":"https:\/\/samjwatkins.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1657\/revisions"}],"predecessor-version":[{"id":1680,"href":"https:\/\/samjwatkins.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1657\/revisions\/1680"}],"wp:attachment":[{"href":"https:\/\/samjwatkins.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/samjwatkins.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/samjwatkins.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}