项目作者: MichaH

项目描述 :
Repairs bad or broken filenames within a given directory
高级语言: Groovy
项目地址: git://github.com/MichaH/repairFileNames.git
创建时间: 2018-07-06T10:12:49Z
项目社区:https://github.com/MichaH/repairFileNames

开源协议:

下载


copyright 2012, 2018 by Orange Objects GmbH & Co. KG

O r a n g e O b j e c t s

http://www.OrangeObjects.de
Author: A. Kling, M. Hofmann

repairFileNames.groovy

Repairs bad or broken filenames within a given directory

Environment

tested with Groovy Version: 1.7.3 JVM: 1.6.0_21

tested with Groovy Version: 2.5.0 JVM: 1.8.0_171 Vendor: Oracle Corporation OS: Linux

Tipp

  • create a symbolic link repairFileNames to ..../src/repairFileNames.groovy in your local ~/bin/.

Test

  1. To run the testcase do the following steps:
  2. $ cd /var/tmp
  3. $ rm -rf testcase && repairFileNames.groovy -v -T testcase
  4. $ repairFileNames.groovy -v testcase
  5. the second run should produce no rename tasks any more
  6. $ repairFileNames.groovy -v testcase
  7. cleanup the testcase now
  8. $ rm -rf testcase

Notes

  • currently everything is hardcoded based on the utf8 charset