|
Home > Archive > Programming with dBASE > June 2005 > Problem when renaming a folder
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Problem when renaming a folder
|
|
| evilaro 2005-06-05, 9:23 am |
| To all:
I use this type of function to rename a folder.
CLASS::RenameDirecto
ry(X_INITIAL,X_END)
function RenameDirectory(cFro
m, cTo)
if type('MoveFile') # 'FP'
extern clogical MoveFile(cstring, cstring) kernel32 from 'MoveFileA'
endif
return MoveFile(cFrom, cTo)
It does it correctelly, but if I have oppened or used X_INITIAL folder, THEN
it does not rename it, nor gives a error.. not even with a try..catch...
etc
I have closed the folder and do other things... to no avail...
If I close the aplication, open it again without looking at the folder
then no problem,
So, what should I close, in order to make it work ??
Thanks
Emilio
| |
| Marko Mihorko [dBVIPS] 2005-06-06, 7:23 am |
| Hello Emilio!
"evilaro" je napisal v sporočilo...
> function RenameDirectory(cFro
m, cTo)
> if type('MoveFile') # 'FP'
> extern clogical MoveFile(cstring, cstring) kernel32 from 'MoveFileA'
> endif
> return MoveFile(cFrom, cTo)
>
> It does it correctelly, but if I have oppened or used X_INITIAL folder, THEN
> it does not rename it, nor gives a error.. not even with a try..catch...
....
> // return MoveFile(cFrom, cTo)
success = MoveFile(cFrom, cTo)
if not success
msgbox("RenameDirectory unsuccessful...","Warning",48)
endif
return
Marko Mihorko [dBVIPS]
| |
| evilaro 2005-06-06, 11:23 am |
|
Marko:
Again....
.....
....
Oh well...
It works
Emilio ;)
> success = MoveFile(cFrom, cTo)
> if not success
> msgbox("RenameDirectory unsuccessful...","Warning",48)
> endif
> return
>
> Marko Mihorko [dBVIPS]
>
>
| |
| Marko Mihorko [dBVIPS] 2005-06-11, 8:23 pm |
| Hello Emilio!
"evilaro" je napisal v sporočilo...
> Oh well...
> It works
Just by pure luck... ;-)
Marko Mihorko [dBVIPS]
|
|
|
|
|