Click here to Skip to main content
15,891,567 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hello


I need to know How can i get the root location file

for example:

I Have a text file "Text.txt" on hard disk Unit C

by SQL create a store procedure with parameter entry with the file name

"exec GetRootFileName 'text.txt'"

Thanks people.

If Need more information please comment this post.
Posted
Comments
Dave Kreskowiak 7-Jul-15 0:26am    
Yeah, this made no sense at all. Are these "files" or filenames stored in a database on the SQL Server? Are you trying to locate an actual file on a drive? What is this "GetRootFilename" your executing? Is it s stored procedure you wrote or what?
Salomon Pineda Silva 25-Jul-15 19:03pm    
I try to get the same function when you serch a file in the explorer.
Dave Kreskowiak 25-Jul-15 19:13pm    
OK, are you searching the file system for a file or are you searching for the filename in a database table?

Without a ton more detail from you everyone is just guessing at what you have to do.
Salomon Pineda Silva 25-Jul-15 21:17pm    
you're right, for that I Put if you need more information. greetings
Dave Kreskowiak 25-Jul-15 21:42pm    
I repeat, "Without a ton more detail from you everyone is just guessing at what you want to do."

1 solution

you cant do it based on the file name, as in various locations you can have file with the same name and extension. Instead write a powershell and try to achieve what you need.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900