Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with Mkdir in tempfolder
Message
 
À
07/08/2001 12:08:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00537623
Message ID:
00540784
Vues:
29
>>
>>Macer,
>>
>>You can't do it this way. You have to create the parent directory prior to creating the child IOW, you have to create the "Hello" folder before you create the "World" child folder.
>>
>>BTW, you don't necessarily have to resort to the function call to the API to get the temp path. Try GETENV('TEMP').
>
>Thanks Everyone,
>
>I was hoping to aviod parsing and creating each folder individually, as there are quite a few MD and MKDir calls in the app, but it looks like I will have to do it.
>
>George, we used to use GetEnv, but switched to the API call when we discovered that some machines didn't have the 'TEMP' system variable defined. In some cases it was 'TMP' and others none... they used the current folder!!!!
>
>Laters
>
Mace,

The API call relies on the same environment variables that GETENV() does. IOW, regardless of which you use, there's no guarantee of success. There may not be a temp directory defined or it may not exist. Here are the rules on how the Windows temp directory is returned GetTempPath(). Further, it's different based on the OS().

Win9x/Me

1. The value returned by the TMP environment variable.
2. If TMP returns no value or the path doesn't exist, the value returned by the TEMP environment variable.
3. The current directory if neither TMP nor TEMP is defined, or don't the paths they specify don't exist.


Since, however, you're working under Win2K, the following isn't going to make you happy.

Window NT/2000

The function does not verify that the value returned by either TMP or TEMP exists. The function uses the following:


1. The value returned by the TMP environment variable.
2. If TMP returns no value the value returned by the TEMP environment variable.
3. The Windows directory if neither TMP nor TEMP is defined.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform