Save a File Using a File Save Dialog Box
2018-09-21 18:55
DemonstrationscriptthatallowsyoutoenterafilenameinaFileSavedialogbox,andthensavesasampletextfile(consistingentirelyofthecurrentdate)underthatfilename.
SupportedPlatforms
WindowsServer2003
No
WindowsXP
Yes
Windows2000
No
WindowsNT4.0
No
Windows98
No
ScriptCode
复制代码 代码如下:
SetobjDialog=CreateObject(SAFRCFileDlg.FileSave)
objDialog.FileName=C:\Scripts\Script1.vbs
objDialog.FileType=VBScriptScript
intReturn=objDialog.OpenFileSaveDlg
IfintReturnThen
SetobjFSO=CreateObject(Scripting.FileSystemObject)
SetobjFile=objFSO.CreateTextFile(objDialog.FileName)
objFile.WriteLineDate
objFile.Close
Else
Wscript.Quit
EndIf
上一篇:深入理解Vue 组件之间传值
文章标题:Save a File Using a File Save Dialog Box
文章链接:http://soscw.com/essay/16647.html