I am attempting to move a file into the temp folder.

I get a folderItem for a file inside the temp folder. This folderItem  
doesn't exist.

I do foo.MoveFileTo theTempFileThatDoesntExist

This gives me a foo.LastErrorCode = 105 ("Invalid name") and the file  
doesn't move.

I *hypothesize* that I can only move a file to a folder, not to a  
file. I can sometimes get moving to a file to work, but I sometimes  
get the 105 (can't find a pattern).

So then I try to do:

foo.MoveFileTo TheTempFileThatDoesntExist.Parent
too.Name = TheTempFileThatDoesntExist.Name

And this works on the Mac but fails on Windows. Sometimes...

I've wound up doing a #If TargetMacOS that does the the two-step move- 
rename on the Mac and the single-step move on Windows, and that  
appears to work.

Is this all just sadly inconsistent between platforms, or am I  
missing something, or what?


Regards,

Guyren G Howe
Relevant Logic LLC

guyren-at-relevantlogic.com ~ http://relevantlogic.com

REALbasic, PHP, Ruby/Rails, Python programming
PostgreSQL, MySQL database design and consulting
Technical writing and training


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to