windows - how to display the length of a FULLNAME -


how can length of full path of filename? 

i getting files recursively in directory structure succesfully, , trying length of fullpath:

get-childitem y:\ -rec | {!$_.psiscontainer} | select-object fullname, lastwritetime, $($_.fullname).length | export-csv -notypeinformation -delimiter '|' -path file.csv 

my issue this: $($_.fullname).length:

select-object : null parameter. expecting 1 of following types: {system.string, system.management.automation.scri ptblock}. @ line:2 char:14 + select-object <<<<  fullname, lastwritetime, $($_.fullname).length | export-csv -notypeinformation -delimiter '|' -pa th file.csv     + categoryinfo          : invalidargument: (:) [select-object], notsupportedexception     + fullyqualifiederrorid : dictionarykeyunknowntype,microsoft.powershell.commands.selectobjectcommand 

how length of fullname of file?

create custom expression in select cmdlet. this:

get-childitem y:\ -rec | {!$_.psiscontainer} | select-object fullname, lastwritetime, @{n="fullnamelength";e={ $_.fullname.length }} | export-csv -notypeinformation -delimiter '|' -path file.csv 

n = name , e = expression. can use full name. l or label alternative name. no mather way write them, end custom property. : )


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -