PDA

View Full Version : How to Delete a file from Girder.

grahamts
January 20th, 2004, 03:37 AM
Hi all,
Yet another seemingly easy problem!
I am trying to automatically delete a file in XP when Girder opens. At the moment I have managed to set up the following:
1. Open a command prompt window,
2. Use keyboard tab to type in the command,
3. Cannot execute the dos command!!!
4. Close Command prompt window.

Any ideas please? Or is there an obvious and incredibly easy way that I have missed?
Graham

Promixis
January 20th, 2004, 09:32 AM
Thats the hard way!

Use the lua command

remove (filename)

see http://www.lua.org/ftp/refman-4.0.pdf near the end under file IO.

grahamts
January 20th, 2004, 11:12 AM
hi Mike,
I cannot get my head around LUA script. I tried your suggestion in the form: remove (D:\docs\five.doc)
but the script wouldn't compile due to the backslashes. The manual is about as easy to read as the astronauts manual for appolo translated into Serbo Croat!
In the end made a batch file of two lines and called that, it works, but I would be interested in how the lua script should have been written,
cheers, Graham.

Promixis
January 20th, 2004, 11:16 AM
its
remove &#40;"d&#58;\\\\docs\\five.doc"&#41;

\ is a special lua character so you need 2 "\\" to equal one "\"

grahamts
January 20th, 2004, 01:33 PM
Cheers Mike,
but how come there are three back slashes after the D?
Graham.

Promixis
January 20th, 2004, 01:36 PM
remember \\ = \ therefore \\\\ = \\

grahamts
January 20th, 2004, 06:18 PM
Can't count :oops:
cheers, Graham