Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How does VFP create the temporal filenames?
Message
De
01/08/2001 06:37:49
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
31/07/2001 17:30:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00538049
Message ID:
00538209
Vues:
11
>Hi everybody !
>
>I would like to know How does VFP create the eight characters temporal file names?
>
>Thanks in advance
>Martin Alcaraz
>malcaraz@rtn.uson.mx

Martin,
It uses system clock.
sys(2015) returns 10 char value guaranteed to be unique on a given computer even if called in the same millisecond.
sys(3) is another one returning 8 digits 'almost' unique filename.
Use sys(2015) to create temp files.
If you need absolutely 8 in lenght, thinking a temp file's lifecyle is not long, you could use :

'_'+substr(sys(2015),4)

or make 2 chars part of extension :

stuff(sys(2015),9,0,'.')

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform