I want to use a batch file for moving some files to some folder to another folder.I am trying with adding batch by DosExec in Before job subroutine then it shows "Unlink" error though the command work fine from command prompt.It also gives same error while running it from routinr.
Kindly suggest how to solve the problem.
I am using: Windows 2003,IBM INFORMATION SERVER(Datastage 8.0 server job)
Unlinking error while run a Dos batch file from Datastage
Moderators: chulett, rschirm, roy
Re: Unlinking error while run a Dos batch file from Datastag
to implement your functionality you can use ExecDos (Before job routine) and give input values for moving a file.
ExecDos move #directory#\file1.txt #directory#\file2.txt
ExecDos move #directory#\file1.txt #directory#\file2.txt
[quote="chulett"]Could be because you are using relative rather than absolute paths for your filenames. If you still have problems, post your syntax. ...[/quote]
cmd1="move /Y I:\TELSTRA_DATASOURCE_ETL\FLEXCAB\SRC\*.csv I:\TELSTRA_DATASOURCE_ETL\FLEXCAB\PRCSD"
Call DSExecute("NT", cmd1, op, SystemReturnCode)
i got similar problem for
cd I:\TELSTRA_DATASOURCE_ETL\FLEXCAB\SRC\
rm -r *
cmd1="move /Y I:\TELSTRA_DATASOURCE_ETL\FLEXCAB\SRC\*.csv I:\TELSTRA_DATASOURCE_ETL\FLEXCAB\PRCSD"
Call DSExecute("NT", cmd1, op, SystemReturnCode)
i got similar problem for
cd I:\TELSTRA_DATASOURCE_ETL\FLEXCAB\SRC\
rm -r *
will only work on Windows if you have MKS toolkit or similar UNIX emulation installed and active. Also, it needs to be on one line separated by semicolon and doing an rm -r command after changing directories but not making sure you are in the right one is asking to find out if your last backup was successful.ArijitS wrote:...rm -r *