Question: The requirement I've got is pretty straightforward, but I'm struggling sifting through the huge amounts of unrelated information on the subject.

**Requirement**

I have files synchronised between my PC and my web server. Basically I need to be able to right click on a local file and copy the equivalent server path (with some additional string manipulation logic) to the clipboard.

**Approach**

I guess what I need done is the following:

1. Add a Windows Explorer context menu option to execute a WSH script passing the full file path and name as a parameter.
2. Create a Windows Scripting Host script that will accept that paramater, do necessary string manipulation, and copy to clip board.

The string manipulation I can handle fine (preferably in VBScript). It's the whole passing a parameter to the WSH script that I can't really find any info about.

Alternately, I wouldn't mind if this was done with PowerShell (if applicable) so that I can learn a bit more about it while I'm at it.

Many thanks in advance.

Answer: 
You can access a parameter in VB script thus:

```
WScript.Echo(WScript.Arguments(0))

```

When you register a shell context menu command, you can pass the path and filename as a parameter by registering:

```
wscript.exe "C:\...full path...\myscript.vbs" "%1"

```
Sorry it's in french, but I can assume the translation of some parts if you are interested. I wrote a year ago an article called [Un menu contextuel "Full PowerShell" dans l'explorer de Windows](http://www.silogix.fr/blog-silogix/Un-menu-contextuel-Full-PowerShell-dans-explorer-de-Windows) which can be translated as "a full powershell contextual menu in Windows Explorer". The concrete given sample is the MD5 hash computing of a file.