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()

```
You can cleanly do it like this

```
EXT_IMAGES = ['.png', '.jpg', '.jpeg', '.bmp', '.svg']
EXT_VIDEOS = ['.mp4', '.mkv', '.webm', '.mpeg', '.flv', '.m4a', '.f4v', '.f4a', '.m4b', '.m4r', '.f4b', '.mov', '.avi', '.wmv']
EXT_AUDIOS = ['.mp3', '.wav', '.raw', '.wma']
EXT_EXCEL = ['.xlsx']

def check_files():
    files = os.listdir()
    for file in files:
        filename, extension = os.path.splitext(file)
        if extension in EXT_IMAGES:
            print('image file found {}'.format(file))
        elif extension in EXT_VIDEOS:
            print('video file found {}'.format(file))
        elif extension in EXT_AUDIOS:
            print('audio file found {}'.format(file))
        elif extension in EXT_EXCEL:
            print('excel file found {}'.format(file))
        else:
            print('unknown file found: %s' % file)

check_files()

```