How to rename a directory with the API? 
Author Message
 How to rename a directory with the API?

How to rename a directory with the API?

I used the command :
run move "dir1" "dir2"
... but it doesn't work under XP !

Thanks



Fri, 02 Sep 2005 22:50:36 GMT  
 How to rename a directory with the API?
Hello, Gatan!
You wrote  on Mon, 17 Mar 2003 09:50:36 -0500:

 GB> I used the command :
 GB> run move "dir1" "dir2"
 GB> ... but it doesn't work under XP !

 GB> Thanks

Use the MoveFile function, e.g.

DECLARE INTEGER MoveFile IN kernel32;
    STRING lpExistingFileName, STRING lpNewFileName

nSuccess = MoveFile("c:\testtest", "c:\New Folder Name")

nSuccess should be 1 if successful
---
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Fri, 02 Sep 2005 23:01:31 GMT  
 How to rename a directory with the API?
Gatan,


 ? !empty(MoveFile('\tmp\In', '\tmp\In1'))

ie , if it succeeds, the return value of MoveFile is non-zero

Gregory
__________


Quote:
> How to rename a directory with the API?

> I used the command :
> run move "dir1" "dir2"
> ... but it doesn't work under XP !

> Thanks



Fri, 02 Sep 2005 23:02:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Renaming directories and changing file attribute in VFP6

2. Rename directories

3. How do I rename a directory?

4. Directory being renamed - help

5. Directory is being renamed - HELP!

6. How to rename a directory from VFP

7. Any command in VFP to rename a directory?

8. Rename a Directory

9. Rename a Directory

10. API routine to replace "RENAME"?

11. Win32 API Function for retrieving DATETIME of directories

12. How to get Windows directory using API

 

 
Powered by phpBB® Forum Software