Hi i'm making a batch file to check the current time and the modification time of a file.
Then I want to extract the modification time of the current time, and this is less then 1 minute it needs to exit the program.
I think the code needs to be like this
DIFFERENCE=CURRENT - MODIFICATION
if difference < 1 minute (
) else (
mysqldump -u root test > Databases/test.sql
copy C:\wamp\bin\mysql\mysql5.5.8\bin\Databases\test.sql C:\Users\Maikel\Desktop\GITstage\PDFTool
git add test.sql
git commit -m "Updating database"
The code after the else is correct, but I don't know how I can calculate the difference between the modification time and the current time.
I know how i can check the modification time of "test.sql". It's done by this
for /d %%a in ("%file%") do echo %%~ta
If somebody can help me out, I would appreciate it