I have a simple problem. I do have a difference tool wich takes direkctories as arguments. It cannot swallow directories ending with
"\". If I need to compare "C:\Prgram Files" with "D:\Program Files" and I use customizeed user menu it makes something like:
diff "C:\Prgram Files\" "D:\Program Files\"
How can I omit the "\" at the end of each argument???
Thanx
Frank
$(FullPathRight)
Here's a little VBScript to get rid of the trailing "\":
Save it as e.g. diff.vbs and use it in AS as the user menu command.
Set the path to your compare tool in the last line according to your needs.
Thomas
Code: Select all
Set objArgs = WScript.Arguments
Verz1=objArgs(0)
if right(Verz1,1)="\" and right(Verz1,2)<>":\" then Verz1=left(Verz1,len(Verz1)-1)
Verz2=objArgs(1)
if right(Verz2,1)="\" and right(Verz2,2)<>":\" then Verz2=left(Verz2,len(Verz2)-1)
Set sh = WScript.CreateObject("WScript.Shell")
sh.Run "diff """ & Verz1 & """ """ & Verz2 & """"
Set the path to your compare tool in the last line according to your needs.
Thomas
-
- ALTAP Staff
- Posts: 5231
- Joined: 08 Dec 2005, 06:34
- Location: Novy Bor, Czech Republic
- Contact: