PowerShell File createdate

Working with files in SQL/SSIS can be way different experience than expectation.

Here is quick way to get file createdate  (not the last modified date) from command prompt using powershell script.

PS: This is not possible in original Linux system as createdate (or birthtime) not stored as per POSIX standard. But current ext4 or BTRFS does have started supporting it

Below PS script can be used to get the file createdate and export all the results in csv directly

get-childitem *.* | select Name,CreationTime | Export-Csv 'scan.csv' -notype

The below command from prompt can be used to execute the PS file

powershell -command .\createdate.ps1

Let Me know if any better way


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s