Batch File to save to Folder I created -


i have batch file below

for /f "tokens=1-3 delims=/" %%a in ("%date%") md "%%a_%%b_%%c"  c:\wamp\bin\mysql\mysql5.6.12\bin\mysqldump -uroot gs > c:\%date%\gs.sql 

i create folder current date , time want do, how set dump folder insert in current date , time folder

the above file runs stops when try , direct folder 1 created

i following error

c:\trevor>c:\wamp\bin\mysql\mysql5.6.12\bin\mysqldump -uroot gs  04/14/2017\gs.sql 1>c:\fri access denied. 

what think meant this:

for /f "tokens=1-3 delims=/" %%a in ("%date%") set "mydate=%%a_%%b_%%c" if not exist "c:\%mydate%\" md "c:\%mydate%" c:\wamp\bin\mysql\mysql5.6.12\bin\mysqldump -uroot gs > "c:\%mydate%\gs.sql" 

please aware %date% can change lot machine machine, there no way can expect therefore work accross other machines.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -