I am using Windows XP. I need to find out the file (in folder D:\Test) with longest path (path length + filename length). How can we find out this using C#?
Is there any command like dir, tree ect for to verify this?
Any idea how to do it using T-SQL?
Note: xp_cmdshell can be used frm T-SQL to get the directory structure
Thanks
Lijo
Using c# you could use the following snippet to retrieve the file with the longest name:
You could validate the output with this PowerShell script:
I don’t know how to do this in T-SQL. However, I don’t know why one want to do that.