Delete __Download\somefile.ext also deletes the folder?!

(imported topic written by Marlon91)

The following code has the end result of deleting the “__Download” folder in the end:

delete 
"__Download\myscript.vbs" move __createfile 
"__Download\myscript.vbs" script __Download\myscript.vbs delete 
"__Download\myscript.vbs"

If the action failed for some reason it will fail the next time on the second line because it cant find that folder. Is that the expected behavior? I have a hard time thinking that’s expected.

I think it has something to do with using the “move __createfile” instead of copy but havent tested that.

Please let me know what you think. Also, I’m sure it says it on my “profile” but I’m running version 6.

Thanks,

Marlon

(imported comment written by BenKus)

Hey Marlon,

The __Download folder will be deleted often by the agent (if a new action runs or if the agent restarts… there might be other times as well)… So I am not surprised if the folder disappears sometimes… but… I don’t think the delete command by itself will remove the folder.

Ben