If you know that your string will be consistent, you can use Right() and/or Left() to lop off what you don't want to keep
tempString = "C:\Temp\file.bat /DUMP" stringLen = Len(tempString) newString = Right(tempString, stringLen - 3) 'newString resolves to "Temp\file.bat /DUMP" Hunter -----Original Message----- From: Abbiss, Mark [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 7:30 AM To: '[EMAIL PROTECTED]' Subject: [ActiveDir] OT: script for user logon URGENT: Please can someone help I am trying to sort out a vbs script we use when logging on to our AD domain (tenuous connection I know !) I have to take a string and trim the beginning and end eg. "C:\Temp\file.bat /DUMP" has to be trimmed to Temp\File.bat /DUMP Can anyone give me a quick and dirty solution...I know nothing about VBS and cant find help on the net that an idiot such as I could understand. Many many thanks for your help. Mark List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
