{"id":18779270,"url":"https://github.com/webcaetano/filename-to-dir","last_synced_at":"2025-12-17T23:30:16.339Z","repository":{"id":57235779,"uuid":"82794889","full_name":"webcaetano/filename-to-dir","owner":"webcaetano","description":"Use filenames to create folders schema","archived":false,"fork":false,"pushed_at":"2017-02-22T11:33:40.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T19:18:10.999Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webcaetano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-22T11:04:49.000Z","updated_at":"2024-08-20T05:55:14.000Z","dependencies_parsed_at":"2022-09-04T23:00:49.237Z","dependency_job_id":null,"html_url":"https://github.com/webcaetano/filename-to-dir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcaetano%2Ffilename-to-dir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcaetano%2Ffilename-to-dir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcaetano%2Ffilename-to-dir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcaetano%2Ffilename-to-dir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webcaetano","download_url":"https://codeload.github.com/webcaetano/filename-to-dir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239690493,"owners_count":19681112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T20:19:26.436Z","updated_at":"2025-12-17T23:30:14.224Z","avatar_url":"https://github.com/webcaetano.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# filename-to-dir\n\n[![NPM version][npm-image]][npm-url]\n[![Build status][travis-image]][travis-url]\n\u003c!-- [![Test coverage][coveralls-image]][coveralls-url] --\u003e\n\n\u003e Use filenames to create folders schema.\n\n## Installation\n\n```\nnpm install filename-to-dir --save\n```\n\n## Usage\n\n```\nnamedir(glob,dest,options,callback)\n```\n\n## Example \n\n```javascript\nvar namedir = require('filename-to-dir');\n\n\nnamedir('**/*.png','./destFolder',function(){\n\n});\n\n// this\n// heroes_$_lulu_$_hit_$_001.png\n// heroes_$_lulu_$_hit_$_002.png\n// heroes_$_janna_$_walk_$_001.png\n\n// return\n// destFolder/heroes/lulu/hit/001.png\n// destFolder/heroes/lulu/hit/002.png\n// destFolder/heroes/janna/walk/001.png\n\n// or\nnamedir(['**/*.png'],'./destFolder',{split:'@'},function(){\n\n});\n\n// with all options\nnamedir(['**/*.png'],'./destFolder',{split:'@'},function(err,data){\n\n});\n```\n\n## Options\n\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eOption\u003c/strong\u003e\u003c/td\u003e\n\u003ctd width=\"300\"\u003e\u003cstrong\u003eDescription\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eDefault\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003esplit\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eSplit string.\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e_$_\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\n## CLI\n\n```\nnpm install filename-to-dir -g\n```\n\n```\nUsage\n\t$ namedir \u003cglob\u003e \u003cdest\u003e\n\nOptions\n\t--split Split string. Default: \"_$_\"\n\nExamples\n\tnamedir \"**/*.png\"\n\tnamedir \"**/*.png\" destFolder/\n\tnamedir \"**/*.png\" \"destFolder/\" --split \"@\"\n```\n\n## Check Also\n\n[flatten-dirname](https://github.com/webcaetano/flatten-dirname)\n\n## License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/filename-to-dir.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/filename-to-dir\n[travis-image]: https://img.shields.io/travis/webcaetano/filename-to-dir.svg?style=flat-square\n[travis-url]: https://travis-ci.org/webcaetano/filename-to-dir\n\u003c!-- [coveralls-image]: https://img.shields.io/coveralls/blakeembrey/filename-to-dir.svg?style=flat \n[coveralls-url]: https://coveralls.io/r/blakeembrey/filename-to-dir?branch=master\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebcaetano%2Ffilename-to-dir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebcaetano%2Ffilename-to-dir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebcaetano%2Ffilename-to-dir/lists"}