Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File Extention Associations
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00482492
Message ID:
00482498
Vues:
10
Does anyone know how to programatically associate a file extention with an executable?

One way: I will skip a couple of steps

I have a file (lcFilename) called Test.txt that I want to run in word -- not the normal notepad or wordpad

1.) Parse out the extension (lcEXTension) for the file that (lcFileName) you want to run Example: lcExtension=justext(lcFileName) = "txt"

2.) Decide what app you want to run for that extension (lcApplication) (example : lcApplication="Winword.exe" -- you probably need the path)

3.) Run it
IF ATC(" ", lcfilename) >0
lcfilename='"'+lcfilename+'"' && check for spaces in file name
Endif
lcopenfile=lcApplication+' '+lcfilename2
RUN /n &lcopenfile

Make any sense?

Kevin
Kevin Emmrich
www.jkt9000.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform