Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
WYSIWYG
Starting Member
15 Posts |
Posted - 2005-10-25 : 08:50:48
|
| I am trying to see if an XML file exists before using the path elsewhere. The logic goes like this.If (file exists)// set the file pathElse// set a different file pathThen use the file path (that exists). |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-10-25 : 08:54:43
|
| Run this to know if file existsExec Master..xp_cmdshell 'Dir file path'MadhivananFailing to plan is Planning to fail |
 |
|
|
WYSIWYG
Starting Member
15 Posts |
Posted - 2005-10-25 : 08:56:15
|
| I will look into this.I neglected to say that I am doing this in C# .NET |
 |
|
|
WYSIWYG
Starting Member
15 Posts |
Posted - 2005-10-25 : 08:58:19
|
I want to do this using C# code, not through SQL.quote: Originally posted by WYSIWYG I will look into this.I neglected to say that I am doing this in C# .NET
|
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-10-25 : 08:58:51
|
| Then do this work there using File System ObjectMadhivananFailing to plan is Planning to fail |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-10-25 : 09:29:33
|
[code]if (File.Exists(path)){ //do stuff}[/code]Go with the flow & have fun! Else fight the flow |
 |
|
|
|
|
|