[futurebasic] moving a file into a folder

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : August 2005 : Group Archive : Group : All Groups

From: Larry T <talltree1008@...>
Date: Fri, 05 Aug 2005 08:21:49 -0700
I'm trying to create a folder and move a file into it, but I'm having
problems.

#1-------------------
I create the folder with:

err = fn FSpDirCreate ( myFSSpec, _smSystemScript, newDirID )

It works, but returns error -43, file not found. Is this a good thing?
Because if I look in the Finder, the folder is there, and if I run the
program a second time, I get error -48, duplicate name.

#2------------------
I try to move the file with:

err = fn FSpCatMove ( srcFSS, dstFSS )

The first time, I get error -43, file not found. On the second run, it
works. I'm thinking I need to update the finder somehow after creating the
directory, before trying to move something into it. Is this true?

#3-----------------
Apple's File Manager Reference defines FlushVol as:

OSErr FlushVol (ConstStr63Param volName,short vRefNum)

but FB expects only one parameter.

When I call it this way: err = fn FlushVol( myFSSpec.volRefNum) I get a hard
freeze.


Any help will be appreciated. Thanks

Larry T