Ks Aditya
Ks Aditya

Reputation: 1

The system cannot find the file specified in bash

I am trying to run SIFT descriptor in windows. There are a large number of files, so instead of running one by one I am trying to run iteratively for all the files in a directory. I am using the following command:

 `for %i in (*.pgm) do siftWin32 <%~i.pgm >%~ni.key`

siftwin32 is a binary executable file and is present in the folder. I am in the current directory. I use dir to see if it is present and it is being listed. but when I run the command I am getting an error saying the system cannot find the file specified.

How to give the path in the command ?

Upvotes: 0

Views: 1917

Answers (1)

dbenham
dbenham

Reputation: 130839

The command is not failing because it cannot find siftWin32; it is failing because it cannot find the .pgm file for the redirection.

The %i variable already contains the .pgm extension, so it fails when you concatenate a second extension.

for %i in (*.pgm) do siftWin32 <"%i" >"%~ni.key"

Upvotes: 1

Related Questions