Thanks so much for the info Gabriel. I tweaked the code you suggested and it does locate the ear file:
import os
path="/path to directory
dirList=os.listdir(path)
for fname in dirList:
if fname.endswith(".ear"):
print 'Say hello to ' + str(fname)
else:
print 'Deployment directory is empty...'
Result:
wsadmin>Say hello to [name of file]
The problem I'm having now is I can't get the AdminApp.install command to read fname; i.e:
import os
path="/path to directory"
dirList=os.listdir(path)
for fname in dirList:
if fname.endswith(".ear"):
AdminApp.install('fname', '[install options]')
When I run it I get the following error:
WASX7115E: Cannot read input file "/path to directory fname"
I know its the syntax (it's always the syntax) but I can't figure out what it is. I hate being this close and hitting a brick wall :-(
PS. I read the info on the monitored directory and I actually like the concept, but I know our Enterprise Security Office would crucify me if I tried to set it up. Thanks for the info though....