Calling Java or sytem cmd from WIn32 task

  • I am trying to call the DEL and JAVA from two win32 tasks.

    The del fails with a 'File not found' error.  The Java just blinks.

    I can cut/paste the command line and parameters into a command line and the Java job runs successfully.

    Does anyone have any idea what is up here?

    TIA

  • The command you specify must be a "real file" (i.e. you must be able to see the command you are running as a file and it must be an executable file e.g. an EXE or a CMD file).  The DEL command is actually internal to the CMD.Exe (or Command.com) program.  To run it, you could do something like

    CMD /C "DEL A.File"

    Not sure what the issue is with the Java file.  Suggest you check things like PATH variables and if you can , get it to log what it is doing.

  • Thanks - using the cmd approach works for the JAVA as well.  I actually ended up using the file system object to do the delete in order to have some error handling.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply