Hello,
I'm making a guess here, since you didn't mention, in "a.delete",
what "a" refers to.
In my opinion, this is a folder that can't be deleted. As I said, the
file system (in any platform) won't let you delete a folder if it is
not empty. That's logical since using, e.g., AFolder.Delete should
only target the AFolder, not items it contains (imagine you're a file
system ;-)).
The 104 error means "File in use". Although I can't reproduce the 104
error here (using Mac OS X 10.4.8 and RB 5.5) when deleting a non
empty folder, I'm guessing this error reveals that the folder can't
be deleted since it still contains items (I've seen this behaviour in
the Finder itself: a folder without name in the trash (from an OS
bug) that prevented the trash to be emptied, with the message "The
item "" cannot be deleted because it is in use.").
But I'm guessing a bit since I assume your "a" variable is a folder.
Regards
Le 3 janv. 07 à 21:42 Soir, Youri a écrit:
Hi,
True, I didn't know that MovefileTo. But still, for curiosity sake,
why this 104 Error? Never mind.
Cheers,
Youri
Arnaud Nicolet wrote:
Le 3 janv. 07 à 16:10 Soir, Youri a écrit:
Hi,
I use the code from the User's Guide to move a folder (and all
inside folders and files) into another folder on the disk.
But at the end, I want to delete the moved folder from the
originating place. Therefore I have used :
a.delete
Where "a" is my source folderitem
The system returns an error code 104 (file in Use).
Any hint, or solution to be able to delete the "a" folderitem?
If your original folder still exists, then you're making a copy,
not a move.
Also, in order to delete a folder, you have to make sure it is
empty (for the file system, deleting a folder means not deleting
something else, therefore it must be empty). Every time you copy
the files, you then call delete. At the end, when a folder is
empty, you can delete it.
Note that using CopyFileTo and then Delete should be equals to
MoveFileTo (you may move the items rather than copying them).
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>