ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Finished Programs

SOLVED: Quick PowerShell Question


I'd like to change the date of all files in a folder, recursively.

A PowerShell script I've found on the Internet to do this is:

$files =  Get-ChildItem -force -recurse | Where-Object {! $_.PSIsContainer}
foreach($object in $files)
     $object.CreationTime=("10 November 2016 12:00:00")

My question is:  Where would one place the folder to be acted upon?

The script above operates on the 'current' folder.  But I'd like to act upon a different folder from 'current.'

Example: C:\Files\*.*

If anyone knows of another 'command line' (i.e., batch file) way of doing the job, please share.


Nicholas Kormanik

The answer is in the documentation?

Good link, highend01.  Explains what I need to know.

Skwire, mark this thread as closed.


[0] Message Index

Go to full version