Skip to content

arg0n3x/fix-ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

fix-ext

This script is used to fix the extensions of multimedia files that have an incorrect extension, no extension, or a double extension. It uses the file command to get the file's MIME type and determine the correct extension. The script renames the file with the same name but with the correct extension. If the file already has the correct extension, the script skips it.

How to use it

  1. Clone the repository
 $ git clone https://github.com/arg0n3x/fix-ext.git
  1. Grant execution permissions to the script
 $ chmod 700 fix-ext
  1. Run the script by passing the -d parameter and providing a directory containing multimedia files to "fix the extensions"
 $ ./fix-ext -d <directory path>

NOTE: The directory must contain only multimedia files such as images, videos, and audio. Any other file types can be added to the script within the fix_extension function.


About

A small script that helps fix the extension type of multimedia files.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages