jeudi 16 mars 2017

Select all files in all directories ending with specific names in ruby

I have a lot of csv files which are saved in multiple directories. I would like to select names which ends with specific name such as "DWA日本語の名前).csv". Note that the name contains both english and Japanese characters and I do not know if this is the right way to select files ending with specific string.

path => "/mnt/resource2/sgsystem/20160206-4/**/*\"DWA日本語の名前).csv"

This is part of input plugin to export data to elasticsearch. It does not throw an error, but the data are not exported to elasticsearch. However, when I replace the Japanese characters (日本語の名前) with English characters(e.g., DWAjapanese.csv), it works properly. Any clue what is wrong here.

Aucun commentaire:

Enregistrer un commentaire