Basically, I'm working on a batch file that would find specific files that don't include a specific character, then use a .jar file on these files. Here's the code that I have:
Set "pattern=$"
FOR /R "%PathToDirectory%" %%# in (*.class) Do (
Echo %%~nx# | FIND /V "%pattern%" 1>NUL && (
java -jar "somejar.jar" %%~# > test\%%~n#.java
)
)
pause
I've checked what commands the .bat file calls out and the java call paths are valid (the .jar and the .bat are in the same directory), though the console outputs that: "The system cannot find the file specified". Same line of code that calles somejar.jar, but bruteforced (as in, the paths to the files are hard-coded in) and pretty much 1:1 to what the bat puts into the console, works just fine in another .bat file.
Safe to say, I'm confuzzled and spent more than I should have on this, so I'm asking here for a bit of help