I am new to Relevance and Actions Scripting language, so please bear with me. I have search the forum and web but I have not found anything that helps.
I am trying to create an action to delete a file from a directory if the directory is not empty.
I started with the simple action of just deleting a file from a directory. I figured that would be the easy part, but it’s not working.
Yes when I put it in the forum the slashes got merged. The line is actually this
delete “C:\Program Files (x86)\BigFix Enterprise\BES Client\___BESData\__Global\__Download\_DML\Adobe-Reader\Test.txt”, but it still does not work. (I have doublechecked the paths and this forum is messing with the slashes)
I checked in Debugger and ran the following Relevances, but the results were False
I would think the __Download folder would be clear unless there was an action running relating to it?
Putting this command aside, what is it this action is meant to accomplish? What is the file being deleted to for the grand scheme of the task and are you sure the task itself is creating the file there or that it already exists?
I’ve run into some oddities dealing with “Program Files”, “Program Files (x86)”, “\Windows\System32”, and “\Windows\Syswow64” based on the BES client falling prey to 32-bit redirection. You might try some checks based on the native/redirected path inspectors and see how they turn out. On my system the file listed below actually does exist:
q: pathname of program files folder
A: C:\Program Files (x86)
T: 0.161 ms
I: singular string
q: pathname of native program files folder
A: C:\Program Files
T: 0.158 ms
I: singular string
q: pathname of program files x32 folder
A: C:\Program Files (x86)
T: 0.170 ms
I: singular string
q: pathname of program files x64 folder
A: C:\Program Files
T: 0.160 ms
I: singular string
q: exists file "C:\Program Files (x86)\PuTTY\Putty.exe"
A: True
T: 0.137 ms
I: singular boolean
q: exists file "PuTTY\Putty.exe" of program files folder
A: True
T: 0.232 ms
I: singular boolean
q: exists file "PuTTY\Putty.exe" of native program files folder
A: False
T: 0.243 ms
I: singular boolean
q: exists file "PuTTY\Putty.exe" of program files x32 folder
A: True
T: 0.239 ms
I: singular boolean
@JasonWalker I ran the above on my Test PC and got Failed repsonses. I think the Test PC that I am using is having serious issues, so I am going to try it on another PC and see if it works.
You should note the end of the message you are mentioning:
no failure reported (action:1915)
This message was improved in later versions, but there was no error in the actionscript its merely telling you that the action didn’t find the file you wanted to delete.
As others have already mentioned, the __Download folder is cleared every time an action starts. In fact if the client CAN’T clear it, another action cannot begin.