PeopleSoft Adoption Made Smooth & Simple!
On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool. Claim Your Free WalkMe Account Now
What I'm trying to do is to see if a file exist in a certain directory, the things that I have encounter if the directory has a space the statement doesn't return a true value.
declare @i as integer exec @i = master..xp_cmdshell 'dir \"E:\Adept Technologies\Documents\Building\B07-100001\B07-100001_Expired*.doc\" /b' if @i <> null begin print 'File does exist' end else begin print 'file does not exist' end
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|SQL 2012 Report Builder 3.0 query||2||22|
|What are the recommended security measures to put in place?||19||91|
|Does INTERSECT return opposite from FULL OUTER JOIN?||4||40|
|T-SQL: need to reset a declared variable||4||31|
Join the community of 500,000 technology professionals and ask your questions.