Home Page › Forums › BizTalk 2004 – BizTalk 2010 › System.IO.Directory.Exists
- This topic has 8 replies, 1 voice, and was last updated 9 years, 8 months ago by
community-content.
-
AuthorPosts
-
-
May 14, 2008 at 10:32 AM #19647
Hi
I am learning to use BizTalk what is the correct syntax to check if a folder exists, I am attempting to use this line of code in an Expression editor but am getting an error
bResult = System.IO.Directory.Exists(@”c:\TestFolder”);
bResult is a boolean.
The error I receive is:
Inner execption: The filename,directory name, or volume label syntax is incorrect
Thanks
-
May 15, 2008 at 2:37 AM #19653
Not sure. I copied your line of code into an expression shape and it worked fine for me using 2006 R2
-
May 15, 2008 at 4:54 AM #19656
Hi Greg
Thanks so much for all your help with my basic issues/questions, I really appreciate it.
I took the same BizTalk application and changed the Application name under Configuration ->Deployment and deployed it and this time it did the check without issues. I had also added some code to create the folder if it did not exist and this also worked and created the folder. Excellent!
To try test and learn some more I changed the path to attempt to create another folder, deployed but this time nothing happened(no errors either). I had to changed the app name again to create a new app for the new folder to be created. It only seems to do the check and creation in the Expression shape correctly the first time I deploy and create the application.
How do I get BizTalk to refresh and use the latest appliction update I have deployed and not use the previously deployed app?
I am using the Trial version of BizTalk 2006.
-
May 15, 2008 at 5:08 AM #19657
Everytime you redeploy an assembly used by Biztalk you need to restart the host instance. Either from Biztalk Admin console or from Admin Tools-> Services
The Host instance is a running windows service, that will reuse any previously loaded assemblies. The only way to reload a new build of an assembly is to stop and start the host instance
-
May 15, 2008 at 5:12 AM #19658
What is the @ symbol for?
-
May 15, 2008 at 5:31 AM #19660
In C# backslashes and letters have meaning (i.e.
means NewLine).When specifying a path you can define it as “C:\\Testfolder\\Test” with double backslashes or you can add the @ before the string and only use a single backslash @”C:\Testfolder\Test”
-
May 15, 2008 at 5:39 AM #19662
sorry that meant to say
means NewLine
-
-
-
-
May 15, 2008 at 5:14 AM #19659
I read that you have to stop and start BizTalk Service BizTalk Group : BizTalkServerApplication service, it worked but do you have to do this everytime you deploy an update?
-
May 15, 2008 at 5:36 AM #19661
Yes you have to restart the host instance ervytime you redeploy. There is an option to do this automatically in the Biztalk project properties under Deployment in Visual Studio
In reference to the @ symbol – see this http://www.kowitz.net/archive/2007/03/06/the-c–string-literal.aspx
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.