Hello All, I am posting the below code so that people who are searching for "how to find owner of a file in windows" will be benefited. I searched a lot to find such code but in vain. Here it is... Pls post any comments about it. <> ====== proc getOwner { filePath}\ { set owner "" global tcl_platform if {$tcl_platform(platform) == "windows"}\ { set filePath [file nativename "$filePath"] if {[file exists "$filePath"]}\ { if {[file type "$filePath"]=="file"}\ { if { ![catch {set str [exec cmd /K dir "$filePath" /Q] }]}\ { # puts $str set match [file tail "$filePath"] set exp ""; append exp "{"; append exp {[[:space:]]([^[:space:]]*)[[:space:]]*\m} "$match" {\M}; append exp "}"; # puts "$exp" regexp "[join $exp]" "$str" v owner } }\ elseif {[file type "$filePath"] == "directory"}\ { if { ![catch {set str [exec cmd /K dir "$filePath" /Q] }]}\ { # puts $str set match [file tail "$filePath"] set exp ""; append exp "{"; append exp {[[:space:]]*([^[:space:]]*)[[:space:]]*} ; append exp "}"; # puts "$exp" regexp "[join $exp]" "$str" v owner } } } }\ elseif {$tcl_platform(platform) == "unix"}\ { set owner [file attributes "$filePath" -owner] } set owner } Regards, Karim ======