ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandor Murakozi" <>
Subject Ant deletes a file that I need
Date Thu, 10 May 2001 12:42:01 GMT
I try to make a task for backup/restore MS SQL databases via OSQL.EXE.
Both of them have the same structure (and a common base class, handles
OSQL.EXE)The backup works fine, but I have a problem with restore. I get
the name of the backup file from a property. When I try to restore, Ant
(I think) DELELTES the backup file, and OSQL can't find it. But if the
name of the backup file is in the Java code, then it works! The
generated command line is the same, and the code is very similar:

	querystring	= new StringBuffer("RESTORE DATABASE " + "news"
+ " FROM DISK=3D'" + getBackupPath() + "'");
	querystring	= new StringBuffer("RESTORE DATABASE news FROM

I set the property backupfile to C:\work\ant\news.bak.

The first deletes the backupfile, but the second restores the database,
from the file news2.bak. Do you have any idea  why does it happen?

Thanks in advance,

View raw message