Giter Site home page Giter Site logo

numberevidences's Introduction

Number Evidences

The pupose of this script is to rename files (typically evidences) based on some options provided in the command-line.

For example, file1.txt, file2.txt could turn into E-01_file1.txt, E-02_file2.txt and so on.

See the example options below!

These are the options:

  • -p (--prefix): Will be the prefix before the numbers (e.g. 'E-')
  • -c (--currhighest): If there are already existing files and you want to start the numbering from a higher number, you write the highest number.
  • -v (--verbose): Will give you verbose output in the terminal.
$ ls 
README.md		evidences		numberEvidences.py	tmp

$ ls evidences/
file1.txt	file2.txt
$ python3 numberEvidences.py --help

usage: numberEvidences.py [-h] [-p PREFIX] [-c CURRENTHIGHEST] [-v]

options:
  -h, --help            show this help message and exit
  -p PREFIX, --prefix PREFIX
                        The prefix to be used -- e.g. E-
  -c CURRENTHIGHEST, --currhighest CURRENTHIGHEST
                        The currently highest number.
  -v, --verbose         Verbose output
$ python3 numberEvidences.py --prefix 'E-' --currhighest 10 --verbose 

[INFO] Info to start
	Prefix to use: {prefix}
	Current Highest Number: {currHighest}
	Verbuse output: {verbose}
[+] Beginning!

[+] Listing folders!

	1 | tmp
	2 | evidences

[!] Which folder contains the evidence? 2

[+] Using folder:	evidences

[+] Checking files in:	/Users/oliver/Dropbox/University/20 KPMG/code/numberEvidences/evidences

[+] Found 2 files. Printing (up to) 5 files,
	- file1.txt
	- file2.txt
[+] Received 2 to rename

[+] Will rename followig 2 files. Printing (up to) 5 files,
	- E-011_file1.txt
	- E-012_file2.txt

Done

$ ls evidences/ 
E-011_file1.txt	E-012_file2.txt

numberevidences's People

Contributors

frostylabs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.