• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Is there a variable for the file you open the CMD file with?

Resolved: Is there a variable for the file you open the CMD file with?

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

My CMD file: java -jar unluac.jar unluac.lua > unluac_decompiled.lua
So in my CMD file, I have to manually change the name of the file I want unluac(.jar) to decompile. Now what I want is to be able to say something like this:
java -jar unluac.jar [var].lua > [var]_decompiled.lua where VAR would be the file i drag onto the CMD file.
enter image description here

Answer:

When you drag-and-drop a file onto one with a cmd extension, the name of the dropped file is passed as the first parameter. So, assuming this will always be files with an “lua” extension, you could do:

If you have better answer, please add a comment about this, thank you!

batch-file cmd
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Passing 2 functions in onChange in react

24/03/2023

Resolved: Why doesn’t stringstream consume output during hex formatting?

24/03/2023

Resolved: CMake path for python3 libraries doesn’t change (windows 10)

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.