Function FilesTree(sPath)
'遍历一个文件夹下的所有文件夹文件夹
Set oFso = CreateObject("Scripting.FileSystemObject") '如f:\
Set oFolder = oFso.GetFolder(sPath)
Set oSubFolders = oFolder.SubFolders
Set oFiles = oFolder.Files
For Each oFile In oFiles
'WScript.Echo oFile.Path
' writetofile(oFile.Path)
'oFile.Delete
Next
For Each oSubFolder In oSubFolders
'WScript.Echo oSubFolder.Path
'oSubFolder.Delete
writetofile(oSubFolder.Path)
FilesTree(oSubFolder.Path)'递归
Next
Set oFolder = Nothing
Set oSubFolders = Nothing
Set oFso = Nothing
End Function
FilesTree(inputbox("Input Parent Folder:")) '遍历
msgbox("ok") function writetofile(s)
Set oFso = CreateObject("Scripting.FileSystemObject")
if oFso.FileExists("folder.txt") then else
set ts=oFso.createtextfile("folder.txt",true)
ts.close
end if Set fs=oFso.OpenTextFile("folder.txt",8,True)
fs.WriteLine(s)
fs.close end functionvbs 遍历一个文件夹
转载zhangxinglong12 博主文章分类:vbs脚本
-
创建一个文件夹
创建一个文件夹
创建一个文件夹 -
遍历两个文件夹,并找出另外一个文件夹没有的对应的文件
【代码】遍历两个文件夹,并找出另外一个文件夹没有的对应的文件。
python 人工智能 linux 后缀 文件名 -
遍历文件夹
# -*- coding: utf-8 -*-#遍历文件夹,并将文件夹中的文件和文件夹打印出来
python 当前目录 转义 指定目录 -
随笔:CUDA和Miniconda3在ubuntu的关系和使用
CUDA和Miniconda3是两种完全不同类型的东西,没有可比性。一个是计算平台,一个是包管理器。安装了Miniconda3,不代表你拥有了CUDA。Miniconda3本身只是一个管理工具。对于深度学习等GPU计算任务,你不需要在系统层面单独安装庞大的CUDA Toolkit。应该利用Miniconda3/Conda的强大功能,在特定的环境中安装所需版本的。这是更简洁、更专业的管理方式。确保先安装好NVIDIA显卡驱动,这是使用GPU进行计算的基础。在Ubuntu上安装NVIDIA显卡驱动。
#ubuntu #CUDA #Miniconda CUDA Python -
Cucumber + Pytest(python)实现自动化(BDD)
摘要: 本文介绍了如何将BDD(行为驱动开发)与pytest+Python结合实现自动化测试。通过pytest-bdd插件,开发者可以使用Gherkin语法编写业务可读的测试用例,同时利用pytest的fixture、参数化等功能。文章详细说明了项目目录结构、Gherkin特性文件编写、步骤定义实现、PageObject模式应用以及测试运行与报告生成方法。这种组合兼具业务可读性和技术灵活性,支持丰富的测试报告和CI/CD集成,是现代化自动化测试的高效实践方案。(150字)
pytest python 自动化 Gherkin 运行测试
















