vbs 復(fù)制指定文件到指定目錄下
更新時間:2019年09月28日 15:47:04 投稿:mdxy-dxy
這篇文章主要介紹了vbs 復(fù)制指定文件到指定目錄下,需要的朋友可以參考下
復(fù)制指定文件到指定目錄下
核心代碼
Set fso=CreateObject("Scripting.filesystemobject") Function CopyFileToPath() SrcPATH = createobject("Scripting.FileSystemObject").GetFile(Wscript.ScriptFullName).ParentFolder.Path DstPATH = "C:\Program Files\AEBELL_DebugTool\DebugTool\dll\FigClient\" fso.CopyFile SrcPATH&"\"&"FigClient.exe",DstPATH,True End Function ' 'Call CopyFileToPath()
代碼二
sourcefilepath="c:\names\names.nsf" desfilepath="d:\name_backup\Name"&""&Year(date)&-Month(date)&-Day(date)&" "&Hour(time)&-Minute(time)&"\" Set fso=CreateObject("Scripting.FileSystemObject") If Not fso.FolderExists(desfilepath) Then fso.CreateFolder desfilepath fso.copyfile sourcefilepath,desfilepath End If
其實(shí)原理都是一樣的。
相關(guān)文章
MSScriptControl.ScriptControl組件屬性、方法、事件介紹
這篇文章主要介紹了MSScriptControl.ScriptControl組件屬性、方法、事件介紹,需要的朋友可以參考下2014-08-0815分鐘學(xué)會vbscript中的正則表達(dá)式
這篇文章主要介紹了15分鐘學(xué)會vbscript中的正則表達(dá)式,需要的朋友可以參考下2018-06-06window通過vbs+bat實(shí)現(xiàn)自動在后臺運(yùn)行nodejs application
這篇文章主要介紹了window通過vbs+bat實(shí)現(xiàn)自動在后臺運(yùn)行nodejs application,需要的朋友可以參考下2016-11-11一個把任何文件轉(zhuǎn)成批處理的vbs腳本Any2Bat.vbs
一個把任何文件轉(zhuǎn)成批處理的vbs腳本Any2Bat.vbs...2007-04-04