put a cmd file in a job | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

put a cmd file in a job

I want to know if a can run a cmd file via a job and if yes, how.
Thanks very much
Select step type: Operating System Command (CmdExec).
I am ashamed for this so stupid question.

It happens. Fortunately I had enough coffee today <img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />
Thanks mmarovic! I think it`s not so stupid. When i run this command:
USE master
EXEC xp_cmdshell ‘D:under_4mars2005all_user_revised.cmd’ It give me this message:
C:WIN2000system32>java -jar xrm-user-import.jar all_user_revised.csv.xml 1>all_user_revised.log
java.util.zip.ZipException: The system cannot find the file specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
Exception in thread "main"
Any idea?
Btw, why don’t you just run: ‘D:under_4mars2005all_user_revised.cmd’ selecting step type i mentioned? I don’t know Java, but maybe you should put full path for files that are java execution parameters or maybe you mistyped their names.
Because I did the test in query analyzer.
The name is good; maybe is a problem with the path of java.
… or source file is corrupted…
Because java can’t find correct classpath. Satya SKJ
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.