Save a File Using a File Save Dialog Box
Demonstration script that allows you to enter a file name in a File Save dialog box, and then saves a sample text file (consisting entirely of the current date) under that file name.
Supported Platforms
Windows Server 2003
No
Windows XP
Yes
Windows 2000
No
Windows NT 4.0
No
Windows 98
No
Script Code
Set objDialog = CreateObject("SAFRCFileDlg.FileSave")
objDialog.FileName = "C:\Scripts\Script1.vbs"
objDialog.FileType = "VBScript Script"
intReturn = objDialog.OpenFileSaveDlg
If intReturn Then
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(objDialog.FileName)
objFile.WriteLine Date
objFile.Close
Else
Wscript.Quit
End If
相关推荐
-
Save a File Using a File Save Dialog Box
Demonstration script that allows you to enter a file name in a File Save dialog box, and then saves a sample text file (consisting entirely of the current date) under that file name. Supported Platforms Windows Server 2003 No Windows XP Yes Windows
-
Locate a File Using a File Open Dialog Box
Demonstration script that displays a File Open dialog box (open to the folder C:\Scripts), and then echoes back the name of the selected file. Supported Platforms Windows Server 2003 No Windows XP Yes Windows 2000 No Windows NT 4.0 No Windows 98
-
file.mkdir()、file.mkdirs()和file.createNewFile()的区别
file.mkdir()创建单级文件夹,file.mkdirs()创建多级文件夹,file.createNewFile()创建的是一个文件. 下面通过一个demo来验证一下: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setConten
-
c# 生成二维码的示例
二维码是越来越流行了,很多地方都有可能是使用到.如果是静态的二维码还是比较好处理的,通过在线工具就可以直接生成一张二维码图片,比如:草料二维码.但有的时候是需要动态生成的(根据动态数据生成),这个使用在线就工具就无法实现了.最好是能在代码中直接生成一个二维码图片,这里我就介绍下使用QRCoder类库在代码中生成二维码. 网上生成二维码的组件还是挺多的,但是真正好用且快速的却不多.QRCoder就是我在众多中找到的,它的生成速度快.而且使用也相当方便. 开始编码 1.安装 QRCoder组件.在项
-
java文件操作工具类分享(file文件工具类)
复制代码 代码如下: import java.io.BufferedInputStream;import java.io.BufferedOutputStream;import java.io.BufferedReader;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.Fil
-
Django处理文件上传File Uploads的实例
HttpRequest.FILES 表单上传的文件对象存储在类字典对象request.FILES中,表单格式需为multipart/form-data <form enctype="multipart/form-data" method="post" action="/foo/"> <input type="file" name="image" /> request.FILES中的键
-
tensorflow模型的save与restore,及checkpoint中读取变量方式
创建一个NN import tensorflow as tf import numpy as np #fake data x = np.linspace(-1, 1, 100)[:, np.newaxis] #shape(100,1) noise = np.random.normal(0, 0.1, size=x.shape) y = np.power(x, 2) + noise #shape(100,1) + noise tf_x = tf.placeholder(tf.float32, x.
-
docker save与docker export的区别
目录 缘起 dockersave dockerexport dockersave和dockerexport的区别 脑洞 缘起 docker save和docker export都能导出镜像包,咋看起来区别似乎不大.本文就针对这个问题,试图搞清楚docker save和docker export的功能是什么?适用于什么应用场景? *注:用户既可以使用 docker load 来导入镜像存储文件到本地镜像库,也可以使用 docker import 来导入一个容器快照到本地镜像库.这两者的区别在于容器
-
java中File类的使用方法
构造函数 复制代码 代码如下: public class FileDemo { public static void main(String[] args){ //构造函数File(String pathname) File f1 =new File("c:\\abc\\1.txt"); //File(String parent,String child) File f2 =new File("c:\\a
-
Perl中使用File::Lockfile确保脚本单实例运行
用Perl写了一些监控脚本,放在crontab中调度执行.有时候会发现一个脚本运行时间过长,会同时跑起多个实例,因此有必要为脚本加上控制,只运行一个实例. 最简单自然的想法,在脚本中检查并创建一个空的lock文件,脚本结束时再删除.通过判断文件是否存在的方式来判断脚本是否已经运行.不过这样做有个bug,如果脚本运行过程中异常终止,lock文件没有正常删除,就会导致脚本无法再运行. 空的lock文件不行,那么考虑在lock文件中加入一点内容,比如进程的PID号,然后通过检查该PID号的进程是否还在
随机推荐
- java中的Io(input与output)操作总结(四)
- Oracle cloud control 12c的启动、关闭及获取安装信息的方法
- Visual Studio 2017正式版发布 Mac版新功能特性有哪些
- asp.net COOKIES需要注意的一点
- thinkphp制作404跳转页的简单实现方法
- C#设计模式之Visitor访问者模式解决长隆欢乐世界问题实例
- Bootstrap Metronic完全响应式管理模板之菜单栏学习笔记
- Node.js站点使用Nginx作反向代理时配置GZip压缩的教程
- asp实现dig功能的js代码
- 详解JavaScript跨域总结与解决办法
- 通过T_sql语句向其中一次填入一条数据或一次填入多条数据的方式填充数据
- SQL Server常用存储过程及示例
- 基于jQuery实现仿51job城市选择功能实例代码
- 基于javascript html5实现3D翻书特效
- Android6.0 屏幕固定功能详解
- 在Apache服务器上添加虚拟主机功能的方法
- CentOS6 配置Nginx,MySql,php-fpm开机启动的方法
- java中Serializable接口作用详解
- C# SendMail发送邮件功能实现
- 第4章 数据处理-php字符串的处理-郑阿奇(续)