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号的进程是否还在
随机推荐
- 如何利用Ruby简单模拟Lambda演算详解
- ASP.NET中实现弹出日历示例
- js正则表达式中test,exec,match方法的区别说明
- fckeditor 常用函数
- 利用CSS3在Angular中实现动画
- Python中查看文件名和文件路径
- 利用ASP.NET MVC+Bootstrap搭建个人博客之praise.js点赞特效插件(二)
- 微信中一些常用的js方法汇总
- asp.net显示图片到指定的Image控件中 具体实现
- C#文件下载实例代码(适用于各个浏览器)
- PHP4和PHP5共存于一系统
- Android环形进度条(安卓默认形式)实例代码
- js 实现的可折叠留言板(附源码下载)
- 浅谈Web下的即时寻呼技术
- 使用原生js实现页面蒙灰(mask)效果示例代码
- 解决jquery .ajax 在IE下卡死问题的解决方法
- JS优化与惰性载入函数实例分析
- mybatis实现增删改查_动力节点Java学院整理
- setTimeout函数兼容各主流浏览器运行执行效果实例
- spring入门教程之bean的继承与自动装配详解
