MSDN Forum: Need help with some cmd language to select current file

Bo 1 Reputation point
2021-07-08T17:36:56.727+00:00

Hi guys, I have a client to request us to add a function like "delete" in the right click menu, so they can right click to move files to a certain folder. I am able to add the function to the right click menu (See the picture), but my script of the function is not working.

113104-image.png

Could anyone give me a hand, and tell me how to select the current file in cmd? I tried . , %1 and $1 , but no luck. If I change the "%1" to a file path, it will work. So the problem should be "%1". My script below:

move /Y %1 "X:\WasteFolder"

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,845 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bo 1 Reputation point
    2021-07-08T17:43:29.06+00:00

    Nevermind. It worked. I had a security program blocked my script from running. after promote my permission, everything is working again. Cheers!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.