Hi Guys,
Hope you're all well. I'm a junior scripting guy but I only know the basics. Part of my script below will delete the user profile. e.g. if the accountname/strUserData is Joe.bloggs, it will delete his profile from location \\rcm-file\staffprof$\joe.bloggs
But how do I amend the last line of code so that it will delete Joe's Windows 7 profile which is joe.bloggs.V2 (only difference is "V2" is added at the end)?
I tried changing "strUserData" to "strUserData.v2" but this does not work.
Please may you provide me with the simple answer?
Many thanks for your help!
----------------------------------------------------------------------
' Delete userprofile if path not specified.
strUserData = "\\rcm-file\staffprof$\" & objUser.sAMAccountName
If (objFSO.FolderExists(strUserData) = True) Then
wshShell.Run "CMD /K rd " & chr(34) & strUserData & chr(34) & " /s", 1, True