Hi Guys, Ok, so I wanted to track down that "file not found error". It turns out that my variable which came from a database was declared as 80 in length, so it was padding the variable with invisible spaces. Hence the "file not found" message. Getting rid of the spaces to leave just the name of the file fixed the problem. The standard
rename file OldFileName NewFileName syntax works just fine after all. Sorry for any confusion I may have caused. Thanks for helping me to work out the problem! Rick On Jan 27, 2011, at 9:06 PM, Rick Harrison wrote: > Hi Richard & Klaus, > > I set the default folder to the correct path > before the rename statement. I've checked it, > and it is correct. I've also tried to fully qualify > the path name for both variables. It still doesn't work. > > Someone other than myself should try to reproduce > the error on On-Rev when they get the chance. > For now the work around with the "Do" command is fine. > > Thanks guys! > > Rick > > On Jan 27, 2011, at 5:35 PM, Richard Gaskin wrote: > >> On 1/27/11 2:11 PM, Rick Harrison wrote: >>> Hi Richard, >>> >>> The paths are valid. >>> >>> The value of "the result" was "can't rename file" >>> >>> SysError() was "2" >> >> 2 = "file not found": >> <http://msdn.microsoft.com/en-us/library/ms681382%28v=vs.85%29.aspx> >> >> Since you're using short paths, you might try checking that the default >> folder is what you'd expect it to be. >> >> -- >> Richard Gaskin >> Fourth World >> LiveCode training and consulting: http://www.fourthworld.com >> Webzine for LiveCode developers: http://www.LiveCodeJournal.com >> LiveCode Journal blog: http://LiveCodejournal.com/blog.irv >> >> _______________________________________________ >> livecode-dev mailing list >> [email protected] >> http://lists.runrev.com/mailman/listinfo/livecode-dev > > > > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode __________________________________ Rick Harrison You can buy my $10 music album "Funny Time Machine" digital CD on the iTunes Store Now! To visit the iTunes Store now to listen to samples of my CD please click on the following link. (Please note you must have iTunes installed on your computer for this link to work.) http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?playListId=213668290 _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
