Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing Read-Only Status 2
Message
De
29/06/2000 13:15:03
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Changing Read-Only Status 2
Divers
Thread ID:
00386558
Message ID:
00386558
Vues:
53
Being uncertain of the exact protocol for expanding this thread I opted to start a new one. Appologies if this is not correct thinking.

I noticed the original thread today and have been working with the suggestions a little. I have encountered a minor problem that I am not able to get around. I have a file that has its attribute set to H(idden). I have used the dos shell to change the attribute, copy the file with a different name, then set it back hidden. Thought I could use these API functions to solve the problem but the file seems to come back with a T(empory) attribute attached to it. I am having AutoCad use the template file created and it chokes on it. Everything else seems to recognize it. It’s a very small file and I think I will just write the file each time using the 6.0 StrToFile function but would like to look at this closer since it seems like it should work.

I’m using the API Bret Hobbs mentioned, file 534, and have the following code:
SET PROC TO h:\foxstuff\fileattr\fileattr.prg

DELETE FILE "d:\update\geo_temp.txt"
SetFileAttr("d:\update\geo_temp.org", "N")
COPY FILE "d:\update\geo_temp.org" TO "d:\update\geo_temp.txt"
SetFileAttr("d:\update\geo_temp.txt", "N")
SetFileAttr("d:\update\geo_temp.org", "H")
At this point a ? GetFileAttr("d:\update\geo_temp.txt") returns “T” for the attribute(s). If I open the newly created file with a text editor and then save it, AutoCad is able to read it just fine. Any ideas?

BTW, the same basic thing happens using Grigore Dolghin’s suggested code.
Jim Philippi

quando omni flunkus moritati
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform