cancel
Showing results for 
Search instead for 
Did you mean: 

Basic Post command not running

Kurbycar32
Level 3


I am backing up some basic files on servers.  my job has a pre-command that runs a basic export function, the job backs up the basic files and my post-command is SUPPOSED to delete these exported files after the backup.

my post command is this:  del d:\PrinterExports\JCEDHCP\*.* /q


for some reason the post command fails, listing "file not found".  yet when i execute this command manually it works perfectly.  also if i put this command in a batch file and execute the .bat as the post command everything works perfectly.  i would like to avoid using .bat files for such a simple function, why doesnt this just work?

1 ACCEPTED SOLUTION

Accepted Solutions

Kurbycar32
Level 3

i guess i was thinking of it wrong.  the post command is basically like entering something into the RUN box, not a CMD window.  so to call a CMD command you have to execute it as a complete cmd string.  my working result is this:

cmd.exe /c del d:\printerexports\jcedhcp\*.* /q


View solution in original post

3 REPLIES 3

Kurbycar32
Level 3

i guess i was thinking of it wrong.  the post command is basically like entering something into the RUN box, not a CMD window.  so to call a CMD command you have to execute it as a complete cmd string.  my working result is this:

cmd.exe /c del d:\printerexports\jcedhcp\*.* /q


Ken_Putnam
Level 6

or you can create a CMD/BAT file and call that.  can be as complicated as you wish

or you can create what BackupExec calls an "Archive" job.  This will backup the selection list, then if and only if, it gets a successful return, will delete the items just backed up

See page 1380 of hte Admin Guide

Kurbycar32
Level 3

interesting, i haven't considered an archive job but ill look into it.  It sounds appropriate in this situation