Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Renaming Directories
Message
 
À
04/08/2006 10:45:51
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01142971
Message ID:
01143011
Vues:
21
>>>>Is there a command within FoxPro to rename an entire directory?
>>>
>>>Update: Do NOT use RD. It's something else. Looking it up now. Ok, this is what I found: http://www.computerhope.com/renamehl.htm
>>>
>>>You can use the DOS command RD from within your code.
>>
>>Maybe this?
>>
>>LPARAMETERS tcoldname, tcnewname
>>DECLARE INTEGER MoveFile IN Win32API STRING @lpcurrentname, STRING @lpnewname
>>LOCAL lcoldname, lcnewname, llresult
>>lcoldname = tcoldname
>>lcnewname = tcnewname
>>llresult = (MoveFile(@lcoldname, @lcnewname) # 0)
>>
>>
>>or this???
>>
>>LPARAMETERS tcoldname, tcnewname
>>oFSO = CREATEOBJECT("Scripting.FileSystemObject")
>>oFolder = oFSO.GetFolder(tcoldname)
>>oFolder.Name = tcnewname
>
>Good ideas, but why are telling me? I didn't ask.

I dunno, you responded to him initally with the 'remove directory' command, so thought you might be interested in these soloutions so I responded to you and clicked the 'forward copy of this reply' checkbox for Alp so both of you would get it.
ICQ 10556 (ya), 254117
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform