第一种:Function BrowseForFile() Dim shell : Set shell = CreateObject("WScript.Shell") Dim fso : Set fso = CreateObject("Scripting.FileSystemObject") Dim tempFolder : Set tempFolder = fso.GetSpecialFolder(2) Dim tempName :
java swing 选择文件夹对话框 import java.io.File; import javax.swing.JFileChooser; public class Test2 { public static void main(String[] args) { JFileChooser jf = new JFileChooser(); jf.setSelectedFile(new File("c:\\我的报表.xls")); int value = jf.showSaveDi
#提供一个文件浏览夹.让用户选择需要打开的文件,打开并显示文件内容: import easygui as g import os msg='浏览文件并打开' title='测试' default='D:\Python练习\*' fileType='全部文件' filePath=g.fileopenbox(msg,title,default,fileType) with open(filePath) as f: title=os.path.basename(filePath) msg='文件%s的