sorry about the OT post but I can't find the solution and PHP is used....
I am writing a database backup script which allows the user to generate
a Windows batch file. Problem is that I get a space after the variable
when I echo a test string.
Batch Code:
@ECHO OFF
for /f "tokens=1,2" %%u in ('date /t') do set d=%%v
set datestr=%d:~6,4%%d:~0,2%%d:~3,2%
set sqldumpfile=Database_dump-%datestr%.sql
echo %sqldumpfile%
This gives me the output of:
Database_dump-20080609 .sql
Notice the space after the date and .sql. How can I get rid of it?
Thanks a lot, the Linux shell script is done but Windows batch is a PITA....