How to execute a folder (vpk.exe) with cmd

I have a vpk.exe application which if i drag a folder onto the vpk.exe the folder gets nameOfFolder.vpk file. Its for game moding. How can i do this with batch. Batch drag and drop onto the vpk.exe.

1 Answer

When you drag and drop a file or folder onto a batch file or executable, Windows launches the drop target and passes the full name of the dropped object as a command-line argument, with quotes if necessary.

It appears that your program takes a folder name on the command line, so the equivalent command would be vpk "C:\Full\Path\To\Folder". You might be able to get away with relative paths, so vpk Folder could work if you're in the directory containing vpk and Folder. Note that vpk can be anywhere if it's on your PATH.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like