Question: How to run Ruta scripts from command line?
I tried this but not sure if this is right command.
`javac DataExtraction.ruta`

Error : `error: Class names, 'DataExtraction.ruta', are only accepted if annotation processing is explicitly requested`

Answer: 
You are taking the wrong argument from the function parameter and should remove the `return` from `else` statement:  

Correct code will be:

```py
import os

def files():
    files = os.listdir()

    file_found_flag = False
    for file in files:
        if file.lower().endswith('.jpg'):
            name= Dict['jpg']
            name(file)
            file_found_flag = True
        elif file.lower().endswith('.pdf'):
            e= Dict['pdf']
            e(file)
            file_found_flag = True

        elif file.lower().endswith('.xlsx'):
            f= Dict['xlsx']
            f(file)
            file_found_flag = True

    if not file_found_flag:
        print('no file found')

def jpg(file):
    print('image file found {}'.format(file))

def pdf(file):
    print('pdf file found {}'.format(file))

def xlsx(file):
    print('excel file found {}'.format(file))

Dict={"jpg":jpg, "pdf":pdf,"xlsx":xlsx }
files()

```
A few of things I noticed that might be wrong in your code:

1. file is a builtin in Python. You might want to change your variable name to something other than file.

```
for f in files:
    if f.lower().endswith('.jpg'):
        name= Dict['jpg']
        name(f)
    elif f.lower().endswith('.pdf'):
        e= Dict['pdf']
        e(f)
    elif f.lower().endswith('.xlsx'):
        func= Dict['xlsx']
        func(f)
    else:
        print('no file found')
        return

```
2. You are using the incorrect argument in your jpeg, xlsx, and pdf methods. 

def jpg(d):
 print('image file found {}'.format(d))

The output produced in my case:

```
image file found abc.Jpg
image file found ferf.jpg
pdf file found vber.pdf
excel file found uvier.xlsx

```