登录 注册

逐项更改一文件夹中所有子文件夹的名字(Win)

收藏
[VB.NET] 标签:WindowsRenameVBFolder 2012-09-26 10:24
原始代码 全屏查看 0评 / 0藏 / 5007阅  跳至 / 20行
Dim fs,fo,a,text,b 
    Set fs=CreateObject("Scripting.FileSystemObject") 
    text=inputbox("Enter your folder path:", "parentfolder") 
    if text = "" then 
    wscript.Quit 
    end if 
    set fo=fs.GetFolder(text) 
    for each a in fo.SubFolders 
    	temp=a.Name 
    	text=inputbox("You want to change " & vbcrlf &temp & " to:", "Rename folder", ""& temp &"") 
    	if text="" then 
    	wscript.quit 
    	elseif text=temp then 
    	b=0 
    	else 
    	a.Name=text 
    	end if 
    next	
    set fo=nothing 
    set fs=nothing

最新评论

  · · · · · ·  (共0条)

目前还没有评论

登录后您才可以发表评论。 马上登录 立即注册
门柱
2012-09-19加入
不懂编程,不过喜欢这个小网站
Back to Top