You are here

Toucan 3.0.3 Prerelease 2 - Using Toucan variable in Script to DELETE file not working

2 posts / 0 new
Last post
happytrail
Offline
Last seen: 14 years 3 months ago
Joined: 2010-08-10 05:28
Toucan 3.0.3 Prerelease 2 - Using Toucan variable in Script to DELETE file not working

Hi Steve

Nice piece of SW. The LUA scripting seems to be very powerful!

I run into a strange inconsistency though (see following script).


-- Problem using Toucan variable to specifiy path for deletion
-- (copy and rename OK, LUA variable OK)
-- Toucan 3.0.3 Prerelease 2 / Vista 32 SP2

-- Variable backupfolder defined as F:\Toucan_Test\ on Variables tab
copy([[@backupfolder@]] .. [[BaseFile.zip]], [[@backupfolder@]] .. [[BaseFile-1.zip]]) -- OK
rename([[@backupfolder@]].. [[BaseFile-1.zip]], [[@backupfolder@]] .. [[BaseFile-2.zip]]) -- OK
delete([[@backupfolder@]] .. [[BaseFile-2.zip]]) -- NOK

-- Using LUA variable
backuppath = [[F:\Toucan_Test\]]
delete(backuppath .. [[BaseFile-2.zip]]) -- OK

Everything works OK excep the first delete operation using the Toucan variable for the path.

The message in the progress window reads:
Failed to delete F:\Toucan_Test\BaseFile-2.zip

There seem to be differences in how copy/rename/delete handle the variable expansion/substitution.

PS: The Flow Control example in the documentation should read elseif not else if

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 2 months ago
Developer
Joined: 2005-12-10 15:22
Thanks

I will get this fixed in the next release!

Log in or register to post comments