Hello It could be, that the Pathname is to long. I had problems like this too. First you could try shorter folder names. I solved the problem with something like this.
$unixRequest:="mv -f "+"\""+$unixPathSource+"\""+" \""+$unixPathTarget+"\"" unix_execute($unixRequest) and in 4D the method unix_execute LAUNCH EXTERNAL PROCESS($tRequest;$unix_In;unix_Out;unix_Err) Regards Oliver Am 14.12.2009 um 13:57 schrieb Steve Alex: > > On Dec 13, 2009, at 10:07 PM, Michael Larue wrote: > >> Two things to look for: > > It is on same volume and folder does exist. I tracked it down to what seems > like a problem in "move and rename": > >> (2) The following example moves and renames the document DocName: >> >> MOVE DOCUMENT("C:\FOLDER1\DocName";"C:\FOLDER2\NewDocName") >> > > More specific test case: > > <code> > $fpath := "/Macintosh > HD/Users/salex/work/AIDTdb/webrest/app/views/Citizens/show.a4d" > $tpath := "/Macintosh > HD/Users/salex/work/AIDTdb/webrest/rgen/xdelete/9BD1BB11show.a4d" > $tpathdir := "/Macintosh > HD/Users/salex/work/AIDTdb/webrest/rgen/xdelete" > writebr("Test $fpath:> " + test path name($fpath) + " (file) : ok="+ok) > writebr("Test $tpath:> " +test path name($tpath) + " : (no file) > ok="+ok) > writebr("Test $tpathdir:> " +test path name($tpathdir) + " (folder) : > ok="+ok) > document list($tpathdir;$files) > a4d.debug.dump array($files) > > move document($fpath;$tpath) > writebr("After move call ok="+ok) > writebr("Test $fpath:> " + test path name($fpath) + " : ok="+ok) > writebr("Test $tpath:> " +test path name($tpath) + " : ok="+ok) > writebr("Test $tpathdir:> " +test path name($tpathdir) + " : ok="+ok) > $bugpath := "/Macintosh > HD/Users/salex/work/AIDTdb/webrest/rgen/xdelete/show.a4d" > writebr("Test $bugpath:> " +test path name($bugpath) + " : Moved file > but did not rename ok="+ok) > document list($tpathdir;$files) > a4d.debug.dump array($files) > </code> > > Output: > > Test $fpath:> 1 (file) : ok=1 > Test $tpath:> -43 : (no file) ok=0 > Test $tpathdir:> 0 (folder) : ok=1 > $files: ARRAY TEXT(0) > # Value Length > 0 "" 0 > After move call ok=0 > Test $fpath:> -43 : ok=0 > Test $tpath:> -43 : ok=0 > Test $tpathdir:> 0 : ok=1 > Test $bugpath:> 1 : Moved file but did not rename ok=1 > $files: ARRAY TEXT(1) > # Value Length > 0 "" 0 > 1 "show.a4d" 8 > > If I do another move call move document($bugpath;$tpath), it will rename > the file, it just won't do a move and rename in one call. > > Should I file a bug report, or did I miss something in the documentation? > > Steve > > _______________________________________________ > Active4D-dev mailing list > Active4D-dev@aparajitaworld.com > http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev > Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ _______________________________________________ Active4D-dev mailing list Active4D-dev@aparajitaworld.com http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/