vbs 复制指定文件到指定目录下
更新时间:2019年09月28日 15:47:04 投稿:mdxy-dxy
这篇文章主要介绍了vbs 复制指定文件到指定目录下,需要的朋友可以参考下
复制指定文件到指定目录下
核心代码
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
其实原理都是一样的。
相关文章
自动写入文件上传到指定服务器SoftwareMeteringCLS.vbs源码
本次文章其中所用脚本代码为ghiconan版主提供的由Branimir petrovic编写的代码,我在后面根据我公司现有的网络情况做了一些文件管理的添加与删除,最后有用FTP批处理的方法上传到服务器内!2008-12-12


最新评论