can any one help me to read the selected file through VB?
All I want to do is make multiple copies of a selected file from windows explorer. I mean if I click on a file in windows exp. and click right mouse button there will be my VB program select that then multiple copies should be made.
This describes how to add a command to the context menu.
You would have to use the name of your VB program and pass it the filename as command line parameter "%1".
In you VB program you use Command$ to access this filename and do with it whatever you like.
I am fine with adding item to context menu by updating the registry.
My problem is when I select any file in windows explorer, I want to read that just selected file name with complete path of that file through VB.
I think there will be WIN API function for this, but I don't know which one it is and how to use it Please help.
Glad taht you succeeded creating new context menu items. I didn't.
Which windows version do you use?
But if you succeed, you are almost there:
Assuming your VB program is called DoIt.exe, then your command key entry must be: DoIt "%1", the %1 passing the complete filename to your DoIt.exe.
That is, when you right click a filename and chose 'DoIt' for that file, your program is startet and the filename passed as a command line parameter.
The passed parameter is available in Command$, a predefined variable containing everything what goes after the program call.
Hope that helps.
And now my messing around with the registry got me stuck. My folders do not open anymore by default.
Would you mind telling my how you produced the menu entry?
I also have XP SP2 and followed the instructions from the link i supplied, but did not succeed in getting a new menu entry. What have I missed?