[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

Re: Directory.CreateDirectory

Tom

7/9/2008 5:56:00 PM

Even more weird, if I change the code to this:
private static readonly string mString = "tempUnzipDir" +
Path.DirectorySeparatorChar + "anotherDir" + Path.DirectorySeparatorChar;

....

public static string ExtractToTempLocation(string aZip)
{
try
{
string tmp = Path.GetTempPath() + mString;
Directory.CreateDirectory(tmp);
// Extract the zip file
}
catch(Exception e)
{
}
}

I see the directory "tempUnzipDir" get created under the administrator's
temporary directory. However, the directory [administrator's temp
path]\tempUnzipDir\anotherDir does not get created. WTH??!!!



"Tom" <johnthompson1@hotmail.com> wrote in message
news:BDD91C65-40DD-433F-8932-18E1A089EE12@microsoft.com...
> This is really weird, but I have the following code:
>
> private static readonly string mString = "tempUnzipDir" +
> Path.DirectorySeparatorChar;
>
> ...
>
> public static string ExtractToTempLocation(string aZip)
> {
> try
> {
> string tmp = Path.GetTempPath() + mString;
> Directory.CreateDirectory(tmp);
> // Extract the zip file
> }
> catch(Exception e)
> {
> }
> }
>
> The code above creates a temporary directory fine on my dev machine
> (Vista), but will not create a temp directory on my server (server 2K3 R2)
> when I move the code over the to server. I have some logging enabled that
> isn't shown in the code above, and it is definately pointing to the
> correct location of the temp directory to be created. Even more weird is
> that the call to Directory.CreateDirectory(tmp); does not throw any type
> of exception on the server. It just keeps executing as if it worked
> correctly. Does anybody have any ideas why this isn't working?
>
> Thanks.
>

11 Answers

tim

7/26/2008 9:35:00 AM

0

Try using System.IO.Path.Combine() method instead of string concat.

"Tom" <johnthompson1@hotmail.com> wrote in message
news:61B35E73-2802-481A-BF57-5F1E87717663@microsoft.com...
> Even more weird, if I change the code to this:
> private static readonly string mString = "tempUnzipDir" +
> Path.DirectorySeparatorChar + "anotherDir" + Path.DirectorySeparatorChar;
>
> ...
>
> public static string ExtractToTempLocation(string aZip)
> {
> try
> {
> string tmp = Path.GetTempPath() + mString;
> Directory.CreateDirectory(tmp);
> // Extract the zip file
> }
> catch(Exception e)
> {
> }
> }
>
> I see the directory "tempUnzipDir" get created under the administrator's
> temporary directory. However, the directory [administrator's temp
> path]\tempUnzipDir\anotherDir does not get created. WTH??!!!
>
>
>
> "Tom" <johnthompson1@hotmail.com> wrote in message
> news:BDD91C65-40DD-433F-8932-18E1A089EE12@microsoft.com...
>> This is really weird, but I have the following code:
>>
>> private static readonly string mString = "tempUnzipDir" +
>> Path.DirectorySeparatorChar;
>>
>> ...
>>
>> public static string ExtractToTempLocation(string aZip)
>> {
>> try
>> {
>> string tmp = Path.GetTempPath() + mString;
>> Directory.CreateDirectory(tmp);
>> // Extract the zip file
>> }
>> catch(Exception e)
>> {
>> }
>> }
>>
>> The code above creates a temporary directory fine on my dev machine
>> (Vista), but will not create a temp directory on my server (server 2K3
>> R2) when I move the code over the to server. I have some logging enabled
>> that isn't shown in the code above, and it is definately pointing to the
>> correct location of the temp directory to be created. Even more weird is
>> that the call to Directory.CreateDirectory(tmp); does not throw any type
>> of exception on the server. It just keeps executing as if it worked
>> correctly. Does anybody have any ideas why this isn't working?
>>
>> Thanks.
>>
>

Klaus Schadenfreude

4/4/2009 10:28:00 PM

0

In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:

>On Sat, 04 Apr 2009 14:42:42 -0700, Klaus Schadenfreude
><klausschadenfreude@yahoo.com> wrote:
>
>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>
>>>
>>>Another right-wing gun nut lashing out at society because he sucked at
>>>life and couldn't find any reason for it other than it must be
>>>everyone else's fault.
>>
>>You've just defined the entire membership of the Democratic Party.
>
>According to your view of them. You seem to be an authority on
>sucking at life so I will just trust your assessment.

That's sounds like something a Democrat would do- just accept whatever
someone tells him without checking it out.

Buster

4/4/2009 11:00:00 PM

0

On Sat, 04 Apr 2009 15:28:00 -0700, Klaus Schadenfreude
<klausschadenfreude@yahoo.com> wrote:

>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>
>>On Sat, 04 Apr 2009 14:42:42 -0700, Klaus Schadenfreude
>><klausschadenfreude@yahoo.com> wrote:
>>
>>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>>
>>>>
>>>>Another right-wing gun nut lashing out at society because he sucked at
>>>>life and couldn't find any reason for it other than it must be
>>>>everyone else's fault.
>>>
>>>You've just defined the entire membership of the Democratic Party.
>>
>>According to your view of them. You seem to be an authority on
>>sucking at life so I will just trust your assessment.
>
>That's sounds like something a Democrat would do- just accept whatever
>someone tells him without checking it out.

It's typical of a republitard to be incapable of detecting sarcasm
when it bitch slaps him in the face.

Klaus Schadenfreude

4/4/2009 11:02:00 PM

0

In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:

>On Sat, 04 Apr 2009 15:28:00 -0700, Klaus Schadenfreude
><klausschadenfreude@yahoo.com> wrote:
>
>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>
>>>On Sat, 04 Apr 2009 14:42:42 -0700, Klaus Schadenfreude
>>><klausschadenfreude@yahoo.com> wrote:
>>>
>>>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>>>
>>>>>
>>>>>Another right-wing gun nut lashing out at society because he sucked at
>>>>>life and couldn't find any reason for it other than it must be
>>>>>everyone else's fault.
>>>>
>>>>You've just defined the entire membership of the Democratic Party.
>>>
>>>According to your view of them. You seem to be an authority on
>>>sucking at life so I will just trust your assessment.
>>
>>That's sounds like something a Democrat would do- just accept whatever
>>someone tells him without checking it out.
>
>It's typical of a republitard to be incapable of detecting sarcasm
>when it bitch slaps him in the face.

It's typical of a Democrat to whine, "I was only joking" when the
truth slips out. What page of the manual is that on, anyway?

Buster

4/4/2009 11:05:00 PM

0

On Sat, 04 Apr 2009 16:02:22 -0700, Klaus Schadenfreude
<klausschadenfreude@yahoo.com> wrote:

>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>
>>On Sat, 04 Apr 2009 15:28:00 -0700, Klaus Schadenfreude
>><klausschadenfreude@yahoo.com> wrote:
>>
>>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>>
>>>>On Sat, 04 Apr 2009 14:42:42 -0700, Klaus Schadenfreude
>>>><klausschadenfreude@yahoo.com> wrote:
>>>>
>>>>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>>>>
>>>>>>
>>>>>>Another right-wing gun nut lashing out at society because he sucked at
>>>>>>life and couldn't find any reason for it other than it must be
>>>>>>everyone else's fault.
>>>>>
>>>>>You've just defined the entire membership of the Democratic Party.
>>>>
>>>>According to your view of them. You seem to be an authority on
>>>>sucking at life so I will just trust your assessment.
>>>
>>>That's sounds like something a Democrat would do- just accept whatever
>>>someone tells him without checking it out.
>>
>>It's typical of a republitard to be incapable of detecting sarcasm
>>when it bitch slaps him in the face.
>
>It's typical of a Democrat to whine, "I was only joking" when the
>truth slips out. What page of the manual is that on, anyway?

So what you're saying is you really did believe I was serious when I
said I would trust your judgement... Then the joke is on you
ShitFraud.

Klaus Schadenfreude

4/4/2009 11:24:00 PM

0

In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:

>On Sat, 04 Apr 2009 16:02:22 -0700, Klaus Schadenfreude
><klausschadenfreude@yahoo.com> wrote:
>
>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>
>>>On Sat, 04 Apr 2009 15:28:00 -0700, Klaus Schadenfreude
>>><klausschadenfreude@yahoo.com> wrote:
>>>
>>>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>>>
>>>>>On Sat, 04 Apr 2009 14:42:42 -0700, Klaus Schadenfreude
>>>>><klausschadenfreude@yahoo.com> wrote:
>>>>>
>>>>>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>>>>>
>>>>>>>
>>>>>>>Another right-wing gun nut lashing out at society because he sucked at
>>>>>>>life and couldn't find any reason for it other than it must be
>>>>>>>everyone else's fault.
>>>>>>
>>>>>>You've just defined the entire membership of the Democratic Party.
>>>>>
>>>>>According to your view of them. You seem to be an authority on
>>>>>sucking at life so I will just trust your assessment.
>>>>
>>>>That's sounds like something a Democrat would do- just accept whatever
>>>>someone tells him without checking it out.
>>>
>>>It's typical of a republitard to be incapable of detecting sarcasm
>>>when it bitch slaps him in the face.
>>
>>It's typical of a Democrat to whine, "I was only joking" when the
>>truth slips out. What page of the manual is that on, anyway?
>
>So what you're saying is you really did believe I was serious when I
>said I would trust your judgement.

Of course. It was the only intelligent thing you posted today, so I
gave you the benefit of the doubt.

Buster

4/4/2009 11:44:00 PM

0

On Sat, 04 Apr 2009 16:23:50 -0700, Klaus Schadenfreude
<klausschadenfreude@yahoo.com> wrote:

>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>
>>On Sat, 04 Apr 2009 16:02:22 -0700, Klaus Schadenfreude
>><klausschadenfreude@yahoo.com> wrote:
>>
>>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>>
>>>>On Sat, 04 Apr 2009 15:28:00 -0700, Klaus Schadenfreude
>>>><klausschadenfreude@yahoo.com> wrote:
>>>>
>>>>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>>>>
>>>>>>On Sat, 04 Apr 2009 14:42:42 -0700, Klaus Schadenfreude
>>>>>><klausschadenfreude@yahoo.com> wrote:
>>>>>>
>>>>>>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>Another right-wing gun nut lashing out at society because he sucked at
>>>>>>>>life and couldn't find any reason for it other than it must be
>>>>>>>>everyone else's fault.
>>>>>>>
>>>>>>>You've just defined the entire membership of the Democratic Party.
>>>>>>
>>>>>>According to your view of them. You seem to be an authority on
>>>>>>sucking at life so I will just trust your assessment.
>>>>>
>>>>>That's sounds like something a Democrat would do- just accept whatever
>>>>>someone tells him without checking it out.
>>>>
>>>>It's typical of a republitard to be incapable of detecting sarcasm
>>>>when it bitch slaps him in the face.
>>>
>>>It's typical of a Democrat to whine, "I was only joking" when the
>>>truth slips out. What page of the manual is that on, anyway?
>>
>>So what you're saying is you really did believe I was serious when I
>>said I would trust your judgement.
>
>Of course. It was the only intelligent thing you posted today, so I
>gave you the benefit of the doubt.

Saying that you're an authority at sucking at life so I should trust
your judgement is the most intelligent thing I've said all day? You
seem to be campaigning for moron of the year here; getting the lookers
on to have faith in your ability to distinguish intelligence from
stupidity seems like a challenge that you're not quite up to.

Derek Mark Edding

4/5/2009 1:26:00 AM

0

Klaus Schadenfreude wrote:

> That's sounds like something a Democrat would do- just accept whatever
> someone tells him without checking it out.

Who you calling a dittohead, monkeyboy?

Klaus Schadenfreude

4/5/2009 1:36:00 PM

0

In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:

>On Sat, 04 Apr 2009 16:23:50 -0700, Klaus Schadenfreude
><klausschadenfreude@yahoo.com> wrote:
>
>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>
>>>On Sat, 04 Apr 2009 16:02:22 -0700, Klaus Schadenfreude
>>><klausschadenfreude@yahoo.com> wrote:
>>>
>>>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>>>
>>>>>On Sat, 04 Apr 2009 15:28:00 -0700, Klaus Schadenfreude
>>>>><klausschadenfreude@yahoo.com> wrote:
>>>>>
>>>>>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>>>>>
>>>>>>>On Sat, 04 Apr 2009 14:42:42 -0700, Klaus Schadenfreude
>>>>>>><klausschadenfreude@yahoo.com> wrote:
>>>>>>>
>>>>>>>>In talk.politics.guns Buster <BusterP@BusterPwns.com> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>>Another right-wing gun nut lashing out at society because he sucked at
>>>>>>>>>life and couldn't find any reason for it other than it must be
>>>>>>>>>everyone else's fault.
>>>>>>>>
>>>>>>>>You've just defined the entire membership of the Democratic Party.
>>>>>>>
>>>>>>>According to your view of them. You seem to be an authority on
>>>>>>>sucking at life so I will just trust your assessment.
>>>>>>
>>>>>>That's sounds like something a Democrat would do- just accept whatever
>>>>>>someone tells him without checking it out.
>>>>>
>>>>>It's typical of a republitard to be incapable of detecting sarcasm
>>>>>when it bitch slaps him in the face.
>>>>
>>>>It's typical of a Democrat to whine, "I was only joking" when the
>>>>truth slips out. What page of the manual is that on, anyway?
>>>
>>>So what you're saying is you really did believe I was serious when I
>>>said I would trust your judgement.
>>
>>Of course. It was the only intelligent thing you posted today, so I
>>gave you the benefit of the doubt.
>
>Saying that you're an authority at sucking at life so I should trust
>your judgement is the most intelligent thing I've said all day?

Come to think of it, you haven't said anything intelligent all day. I
withdraw the statement.

Klaus Schadenfreude

4/5/2009 1:37:00 PM

0

In talk.politics.guns Derek Mark Edding <dreq@earthlink.net> wrote:

>Klaus Schadenfreude wrote:
>
>> That's sounds like something a Democrat would do- just accept whatever
>> someone tells him without checking it out.
>
>Who you calling a dittohead, monkeyboy?

Having trouble following the thread, shit-for-brains?