-2

The scenario:

I have thousands of pictures (Both in .jpg and RAW), where each pair has the same name. I have looked through the JPGs and deleted hundreds of undesirable photos. Now I want the corresponding RAWs (The ones without "partner") deleted.

Everything is allowed: cmd, Windows Powershell, Scripts, hidden functions in Windows Explorer, ...

1 Answers1

1

Speed is absolutely unimportant, you could have opened Windows Explorer, sorted by name highlighted all instances and deleted them in the time it took you to post this message and wait for an answer to your off-topic question.

Open a Command prompt window, (cmd.exe), CD to your directory holding these files; then enter this:

For %A In (*.RAW) Do @If Not Exist "%~nA.jpg" Del "%A"
Compo
  • 36,585
  • 5
  • 27
  • 39
  • I am thankful for your answer. To the first sentence: 1) I understand you can ask any question on the Stackexchange network as long as a certain quality is met, and it is asked within a fitting subnetwork. Please educate me regarding the off-topicness. 2) Regarding time: Absolutely not. This is something I will be doing frequently. – Robert Tausig Jun 01 '18 at 16:19
  • At StackOverflow, we are here to provide assistance with specific issues with your code. In order to do that, you are supposed to provide, in your question, a [mcve]. If you don't provide code, and an explanation of what is or isn't happening with it, sufficient for us to replicate it, you are effectively, asking for somebody to do it for you for free. Take a look at the [tour] and [ask], for further guidance. – Compo Jun 01 '18 at 16:57