Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't open File using FOPEN
Message
De
17/05/2009 19:10:34
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
17/05/2009 19:05:37
Victor Lapid
Phil. Long Distance Tel. Co.
Manila, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01400327
Message ID:
01400329
Vues:
71
>Hi All,
>
> Im using the low level function (FOPEN) in VFP 7 and can't hardly figure out why it can't successfully open the file.
> What I am doing is put an array of text files in a specified directory and open it one by one using for loop. But when tried to substitute directly the name of the file in FOPEN parameters (for debugging purpose), the file will be successfully opened.
>Any help will be gladly appreciated
> Code:

>
   CLOSE ALL
>   CLEAR ALL
>   
>   DIME temp[1]
>   lcdirarray=adir(temp,'c:\inetpub\ftproot\icms\sbslsop*.txt.old')
>
>   FOR j = 1 TO dirarray
>*    x=FOPEN(temp(j,1),2) 

 x=FOPEN(forcepath(temp(j,1), "'c:\inetpub\ftproot\icms"),2)
 
>    ?x  && for debugging 
>    WAIT ''
>   ENDFOR
Adir() keeps only the filename, without a path. When accessing the file, you need to add the path. See the correction in your code.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform