Get the App
SLTechnology News&Howtos  ›  Development  › 

How to modify directory name and shortcut name through vbs

Shulou Source: shulou.com Published: 2022-06-03 08:39:26 10月03日 Update

This article mainly introduces how to modify directory names and shortcut names through vbs. It is very detailed and has certain reference value. Friends who are interested must finish reading it.

The code is as follows:

Set fso=wscript.createobject ("scripting.filesystemobject") OldFolderName1= "263Enterprise Messenger" newFolderName1= "Peacemap Messenger" OldFileName1 = "263Enterprise Messenger.lnk" newFileName1 = "Peacemap Messenger.lnk" OldFileName2 = "Uninstall 263Enterprise Messenger.lnk" newFileName2 = "Uninstall Peacemap Messenger.lnk" originalpath= "C:\ Documents and Settings\ All Users\" start menu\ programs "newpath=" C:\ Documents and Settings\ All Users\ "start" menu\ programs\ Peacemap Messenger "deskpath=" C:\ Documents and Settings\ All Users\ table Face "if (fso.folderexists (originalpath &"\ "& OldFolderName1)) then Set fsoGetFolder = fso.GetFolder (originalpath &"\ "& OldFolderName1) fsoGetFolder.Name = newFolderName1end ifif fso.fileexists (newpath&"\ "& OldFileName1) then set f=fso.getfile (newpath&"\ "& OldFileName1) f.name=newFileName1 end ifif fso.fileexists (newpath&"\ "& OldFileName2) then set f=fso.getfile (newpath&"\ "& OldFileName2) f.name=newFileName2 end ifif fso.fileexists (deskpath&"\ "& OldFileName1) then Set f=fso.getfile (deskpath& "\" & OldFileName1) f.name=newFileName1 end ifmsgbox "done!" The above is all the contents of the article "how to modify directory names and shortcut names through vbs". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Name method catalogue content program article menu code value interest guy partner more desktop knowledge industry information information channel channel reference Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Linux Huawei Shulou Technology Xiaomi