我是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"
如果新的商店,向其中加入我需要复制所有的线路和粘贴一次。这是全部硬编码,请请建议一些事情,这样我就可以免除这个硬编码
你当然已经尝试过任何东西。你为什么不张贴这个,以便我们可以用它作为一个起点? –