留着自用
sqlserver吧
全部回复
仅看楼主
level 5
奋斗中$ 楼主
--查看系统配置
select * from sys.configurations
go
exec sp_configure 'show advanced options',1 --开启服务
reconfigure --重新配置
go
exec sp_configure 'xp_cmdshell',1 --开启服务
reconfigure
go
exec xp_cmdshell 'mkdir D:\tt' --创建文件夹 D:\tt文件目录
exec xp_cmdshell 'echo D:\test.txt'
exec xp_cmdshell 'copy D:\tt\souceFile.txt D:\ ' --复制到D盘,并且已源文件名称产生
exec xp_cmdshell 'copy D:\tt\souceFile.txt D:\target.txt ' -- 复制到D盘,但是已新的文件名保存
exec xp_cmdshell 'ren D:\oldfilename.txt,newfilename.txt ' --更改文件名
exec xp_cmdshell 'del D:\newfilename.txt ' --删除文件
exec xp_cmdshell 'rd D:\tt /s/q' --删除文件夹
---------------------
作者:lzq_it
来源:CSDN
原文:https://blog.csdn.net/lzq_it/article/details/7359606
版权声明:本文为博主原创文章,转载请附上博文链接!
2019年01月15日 19点01分 1
1