how do i update the date-created attribute for multiple files using csv data?

@Doug Maurer provided an incomplete answer (did not work) so here is the working solution:

$csvfile = 'path/to/csvfile.csv'
$startdate = [datetime]::ParseExact('15/11/2019','dd/MM/yyyy',$null) 

Set-Location 'path/to/folder'

Import-Csv $csvfile | ForEach-Object {

    #set creationtime
    (Get-Item $_.filename).CreationTime = $startdate

    #increase date by one day
    $startdate = $startdate.AddDays(1)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top