mustafadalga / file-extension-converter

File Extension Converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File Extension Converter

This script converts the file extensions of files in a specified directory or the current directory if no target is provided. It supports specifying the current and new file extensions, as well as the target directory.

Table of Contents

Features

  1. Convert file extensions in a specified directory or the current directory.
  2. Specify the current file extension and the new file extension.
  3. Optionally specify the target directory with --target argument.
  4. Script scans all files, including nested folders and files.

Usage

Prerequisites

To make the save.sh script executable on your computer, you need to set the executable permission for the file. You can do this using the chmod command. Here's how:

chmod +x convert.sh

Examples

Example 1: Convert all .vue files to .ts files in the src/template directory

This command will run the script, converting all .vue files to .ts files in the specified src/template directory.

test@computer % ./convert.sh --current_ext vue --new_ext ts --target src/template 

Convert all .ts files to .vue files in the current directory

This command will run the script, converting all .ts files to .vue files in the current directory.

test@computer % ./convert.sh --current_ext ts --new_ext vue

License

License

About

File Extension Converter

License:GNU General Public License v3.0


Languages

Language:Shell 100.0%