Remove (network) path from string in VBScript -



Remove (network) path from string in VBScript -

at moment writing script has creating list of files. want remove root-path output. works local path (c:\programdata) not work network path (\192.168.0.1).

example of code:

set objfso = createobject("scripting.filesystemobject") objstartfolder = "c:\programdata" set objfolder = objfso.getfolder(objstartfolder) wscript.echo replace(objfolder.path,objstartfolder,"")

in output want c:\programdata\xyz , \192.168.0.1\xyz.

since didn't utilize vbscript before hope can help me here.

objfolder.parentfolder

should homecoming part wish remove, is, lastly \.

(community wiki, reply sake of it)

string vbscript

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -