我是perl腳本中的新成員。你能建議我如何將幾行批處理腳本轉換爲perl腳本。如何將幾行批處理腳本轉換爲perl腳本
我的批處理腳本是:
:: delete *.bak file from store_id Patel General del "D:\Database\Patel General Store\*.bak" :: change Directory cd "C:\Program Files\7-Zip" :: extract new data from drop box to database folder "C:\Program Files\7-Zip"\7z.exe -o"D:\Database\Patel General Store\" e "D:\Dropbox\Database Backup\Patel General Store\*" d :: Rename new .bak data with storelocation_storeid_store_na cd\ rename "D:\Database\Patel General Store\*.bak" MUM_099_Patel_General_Stores_30.bak cd\ sqlcmd -S"ADMIN-PC\SQLEXPRESS" -E -Q "restore database MUM_099_Patel_General_Stores_30 from disk='D:\Database\Patel General Store\MUM_099_Patel_General_Stores_30.bak' with move 'Account180001' to 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\MUM_099_Patel_General_Stores_30.mdf',Move 'Account180001_LOG' to 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\MUM_099_Patel_General_Stores_30_Log.ldf',replace"
如果新的商店,向其中加入我需要複製所有的線路和粘貼一次。這是全部硬編碼,請請建議一些事情,這樣我就可以免除這個硬編碼
你當然已經嘗試過任何東西。你爲什麼不張貼這個,以便我們可以用它作爲一個起點? –