GithubHelp home page GithubHelp logo

caocmai / batch-rename Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 29 KB

A Go project to batch rename files of specified filetype within specified folder.

Go 96.96% Python 3.04%
golange renamed-files batch

batch-rename's Introduction

Go Report Card

Batch Rename

This Go program renames all files of specified file type and stores them into a new folder.

Prerequisites

Usage

To use this program, provide the information to the flag items. The filetype flag is the only required flag, and when an input folder is not specified it looks at the root of the project directory for files of that file type. All other flags are optional.

Project Flags

A list of all the flags and their usage for this project

Flag Default Value Helper Text
filetype nil [Required] Enter filetype you want to rename, ie .txt
inputFolder "" Enter the folder of files to rename
outputFolder "output_files" Enter folder name to store renamed files in
renameFileAs "renamed_file" What to call the renamed files
Flag Explanation

filetype - the program will look for files of this file type
inputFolder - the program will look for files inside this folder. NOTE: folder must be at root of project. If one is not provided then program will look for the files at the root of project
outputFolder - the program will store all renamed files into this folder
renameFileAs - the renamed files will start with this string

Example Usage

Case 1: If you want to rename all .jpg files in a folder called pictures.

In terminal run:

$ go run main.go -filetype=.jpg -inputFolder=pictures

You can use other flags to customize renaming of files, if not they will take the default values, shown in the Flags Table above.

Case 2: If you want to rename all .jpg files in a folder called pictures to something that starts with Vacation_2021_XX and save all the renamed files into a folder called Vacation2021.

In terminal run:

$ go run main.go -filetype=.jpg -inputFolder=pictures -ouputFolder=Vacation2021 -renameFileAs=Vacation_2021

Note

This project has only been tested on a Mac machine.

Additional Resources

batch-rename's People

Contributors

caocmai avatar

Watchers

 avatar  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.