this is my batch
sqlcmd -S PC-SERVER\SQLEXPRESS -i "D:\BK_NONE\BACKUP.SQL"
If not exist %~f1.\tmp.BAK (Echo files not found in %~f1 & GoTo :EOF)
SET mese=%DATE:~3,2%
SET giorno=%DATE:~0,2%
SET anno=%DATE:~-4%
SET ora=%TIME:~0,2%
SET min=%TIME:~3,2%
SET sec=%TIME:~6,2%
Ren "%~f1.\tmp.BAK" "%anno%%mese%%giorno%%ora%%min%%sec%.bak"
if i run this bath from windows there aren't problem then i run from vb.net code runnig only first line
i don't think that my problem is in the batch file.