Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rename a file...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00661033
Message ID:
00661046
Views:
26
>>VFP give us the commands MD, CD, Copy file...
>>Is there a comand to do the rename?
>>
>>How can I do a rename of a file name?
>
>Don't know if there is a rename file command .....
>
>But you can do this ...
>
>
>*!* Rename file x.txt to y.prg
>COPY FILE x.txt TO y.prg
>
>IF (FILE("y.prg"))
>  DELETE FILE x.txt
>ELSE
>  WAIT WINDOW "Rename file failed...." NOWAIT
>ENDIF
>
>
>HTH
>
>Alonso

Yes, there is a VFP command;

RENAME FileName1 TO FileName2

Be sure to include the file extentions....
Previous
Reply
Map
View

Click here to load this message in the networking platform