如何从SQL Server中的任何文件获取完整路径位置 [英] How get full path location from any file in SQL Server

查看:276
本文介绍了如何从SQL Server中的任何文件获取完整路径位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好





我需要知道如何获得根位置文件



例如:



我在硬盘单元C上有一个文本文件Text.txt



由SQL创建一个带参数条目的存储过程,文件名为



exec GetRootFileName'text.txt'



谢谢大家。



如果需要更多信息,请评论这篇文章。

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.

推荐答案

你不能根据文件名来做,因为在不同的位置你可以拥有相同名称和扩展名的文件。而是写一个powershell并尝试实现你需要的东西。
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.


这篇关于如何从SQL Server中的任何文件获取完整路径位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆