Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADir() issue
Message
 
À
17/03/2003 12:54:21
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00766008
Message ID:
00766646
Vues:
21
Steve,

Let us suppose that you have following files in directory:
11000000_01.txt
11000000_02.txt
11000000_03.txt
11000000_04.txt
11000000_05.txt
11000000_06.txt
11000000_07.txt
....

Their DOS names you can see if from DOS prompt you run:
dir 11*.txt


110000~1.txt
110000~2.txt
110000~3.txt
110000~4.txt
1123D0~1.TXT
112BC0~1.TXT
112FC0~1.TXT

As far as I understood the problem is that you want to use DOS file names, but you do not know exactly their names because adir() gives you their proper long names. So you need to get their DOS names. One of the approach is to run dir from VFP and redirect output to the file:

RUN DIR 11*.txt > logfile.log
if after that you open logfile.log for editing, you should see something like:

Volume in drive C has no label
Volume Serial Number is F426-3E0B
Directory of C:\

110000~1 TXT 5 03/17/03 1:19p
110000~2 TXT 5 03/17/03 1:19p
110000~3 TXT 5 03/17/03 1:19p
110000~4 TXT 5 03/17/03 1:19p
1123D0~1 TXT 5 03/17/03 1:20p
112BC0~1 TXT 5 03/17/03 1:19p
112FC0~1 TXT 5 03/17/03 1:19p
7 file(s) 35 bytes

So my suggestion is to gather this information and use it as needed in the code.


>I don't understand what you are telling me. Can you explain in more detail?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform