Access the particular file properties

PS C:\Users\HP> $file = get-childItem C:\Users\HP\OneDrive\Desktop\pro1.txt
PS C:\Users\HP> $file.name
pro1.txt
PS C:\Users\HP> $file.extension
.txt
PS C:\Users\HP> $file.length
389
PS C:\Users\HP> $file.basename
pro1

 find the file properties using PowerShell


How to find the file properties using powershell

PowerShell is a modern command shell that includes the best features of different shells . Unlike the other shells which only accept and return the text but in PowerShell it is different it returns the object in the .NET objects. In this article we will find out certain commands to  find the file properties using PowerShell.

Similar Reads

Find the file properties

Now to access the file properties using the PowerShell we use some commands in order to get the file properties,...

Using Get-ChildItem to find the file properties

Get-ChildItem is used to gets the items and child items in one or more specified locations....

Using Get-Item to find the file properties

Get-Item command is used to gets the items at the specified location....

Using Get-ItemProperty to find the file properties

Get-ItemProperty command is used to gets the properties of all the items at the specified path....

Access the particular file properties

PS C:\Users\HP> $file = get-childItem C:\Users\HP\OneDrive\Desktop\pro1.txt PS C:\Users\HP> $file.name pro1.txt PS C:\Users\HP> $file.extension .txt PS C:\Users\HP> $file.length 389 PS C:\Users\HP> $file.basename pro1...

Contact Us