Windows Delete

pstamey (2 posts)
February 24, 2004 07:40 AM
Accepted Answer

I'm trying to delete a file using Adtempus.  One of my job steps is to execute c:\winnt\system32\cmd.exe with a command line parameter of /c del filename.  The step fails everytime.  I assume that it is because the step is waiting for a response from a user.  Does anyone know of a way to get around this?

erinr (8 posts)
February 24, 2004 03:00 PM
Accepted Answer
This worked fine when I tried it. For you is it failing to delete the file or does adtempus say the job failed but it really was deleted? You could try the /q parameter to the del command to make it not prompt for confirmation. You could also use the capture console option when you set up the job to see what it's asking you for.
pstamey (2 posts)
February 24, 2004 03:05 PM
Accepted Answer

Well, I learned some things today.  First, the /f with the del will force the files to be deleted.  Second, you must make sure you don't have any extra spaces between the /f and the file name, it really only likes one.  Finally, I learned something I've known for years...if the file doesn't exist, you can't delete it.

On another note, do you have a good idea where I can get a key for those message codes that show up in the status reporting?

erinr (8 posts)
February 24, 2004 03:20 PM
Accepted Answer

"message codes"--do you mean the "result" listed by adTempus? That's the exit code returned by the program. It depends on the program you are running. There's a snarky note about this in the user guide (http://www.arcanadev.com/adtempus/documentation/2.0/default.htm#notes/Exit_Codes.htm).

 

cullil01 (3 posts)
February 26, 2004 12:59 AM
Accepted Answer
I foudn a similair issue but only when using unc paths which is of course not supported by the command line del, I have written a vb app that you can use as a command line execution with parameters, if anyone wants it let me know.
eddiedout (1 post)
March 11, 2004 02:32 PM
Accepted Answer
Regarding -

"I have written a vb app that you can use as a command line execution with parameters, if anyone wants it let me know."

I'd appreciate having it. Thanks in advance.

You can send it to -

[email protected]

Replies are disabled for this topic.