![]() I have some doubts output this line.īut this code can be used to get the name of the newest *.zip file according to last modification date without path. I don't know if the last command line in question is really correct. I stuck with FOR, but don't know if there would also be another possibility. \ROMEXIS -pwd password disconnect Romexis_db SqlRestore D:\Romexis_Bilder\romexis_SQL_Backup\*.zip -db Romexis_db -srv. The result of FOR should be used in *.zip cd C:\Program Files (x86)\Pranas.NET\SQLBackupAndFTP\ ![]() (I don't really know how to set the parameters here.) for /f "tokens=*" %% in ('dir /D:\Romexis_Bilder\romexis_SQL_Backup /od') do set newest=%%D:\Romexis_Bilder\romexis_SQL_Backup Go into the directory: pushd "D:\Romexis_Bilder\romexis_SQL_Backup"įind the latest file. ![]() The latest added file to the directory (result of FOR /F) should then be used in SQL RESTORE (backup and ftp program Windows). These are ZIP SQL backup files that are generated two times daily in the format yymmddhhmm.zip, e.g Romexis_db201805271200.zip on a server running Windows 2016 Server. I want to make a batch or cmd file to automatically select the latest file in the directory D:\Romexis_Bilder\romexis_SQL_Backup. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |