Is there is a piece for code ot sample code that can let me check if a file exists? Has any one done this before?
ThanksTry this idea.
create table #tmp(result varchar(100))
go
insert #tmp
exec master..xp_cmdshell 'dir filename.txt'
select * from #tmp where result like '%filename.txt%'|||Originally posted by snail
Try this idea.
create table #tmp(result varchar(100))
go
insert #tmp
exec master..xp_cmdshell 'dir filename.txt'
select * from #tmp where result like '%filename.txt%'
I found another method to do this. I used the xp_fileexist command and it works well. The idea above works as well
Thanks for the input.sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment