http://www.google.com/search?q=ms+dos+command+tutorial
Hope this helps.
Kees
![]() | Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years. Thanks, CNET Support |
I am newbie to batch files. Any help would be appreciated.
I want to execute a dtsx package first and when complete execute an ant file.
First, I want to check if any files (.txt) exists in a folder.
IF exists *.txt in D:\folder
if yes:
(C:\SQL\ProjectName\bin - do I haveto set the path first?)
execute dtexec /f mypackage.dtsx
then:
(D:\MyTools\bin)
execute ant -buildfile D:\project\conf\file.xml
If no files exists and folder is empty : quit
Hope this makes sense,
Jill
Discussion is locked
Thanks for the warm welcome Kees!
Thanks for the suggestion to actually perform a search on Google, mind blowing! I have already searched around and have not been able to find a particular good tutorial.
Hence the post.
If you have a particular tutorial that you have used and would like to recommend that would be cool.
I learned it from the DOS 5.0 manual.
What's your exact problem? I mean, what particular command don't you grasp? And what part works?
I see the following elements:
- if to see if files exist
- cd to jump to the right folder
- running a program
Tell more on where you get stuck.
Kees
This is what I got so far and this works.
Is there anyway I can verify that the second process does not starts until the first has completed?
@echo
If exist C:\testFolder\testfile.txt (
echo file exists
cd "C:\Documents\JillH\Desktop\EmbeddedSQL\DB_Project_INT\bin"
dtexec /f loadRArecords.dtsx
REM(The next process should not start until the first one has completed)
cd "C:\Client\Tools\bin"
ant -buildfile C:\Client\Tools\config\demo_1.xml
) else (
echo file does not exists
EXIT
)
Thanks,