-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from 2bitninja/AddMenu
Script is now functional
- Loading branch information
Showing
8 changed files
with
116 additions
and
17 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test-dir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
# Created to on 20231009 to make dummy files for testing the mass_rename script | ||
mkdir test-dir 2>/dev/null | ||
cd test-dir | ||
cat ../list.txt |while read -r line | ||
do echo -e $line | ||
touch "$line" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
# mass_rename | ||
This BASH script is for mass renaming and moving of files. | ||
|
||
### Why this maybe useful | ||
Need to rename media files for use in an application such as; PLEX, Jellyfin, etc.. | ||
Want torename picuture from trip so you can group them together | ||
|
||
Basic code | ||
``` | ||
ls | while read line | ||
do echo $line | ||
mv "$line" "$(echo -e "$line" |sed -e 's///' -e 's///' )" | ||
done | ||
``` | ||
This will subsittute the oldname for the new name. | ||
# mass_rename | ||
This BASH script is for mass renaming and moving of files. | ||
|
||
### Why this maybe useful | ||
Need to rename media files for use in an application such as; PLEX, Jellyfin, etc.. | ||
Want torename picuture from trip so you can group them together | ||
|
||
Basic code | ||
``` | ||
ls | while read line | ||
do echo $line | ||
mv "$line" "$(echo -e "$line" |sed -e 's///' -e 's///' )" | ||
done | ||
``` | ||
This will subsittute the oldname for the new name. | ||
|
||
|
||
### Script is for making the dummy files for testing the mass_rename script (DummyFileCreater.sh) | ||
``` | ||
cat list.txt |while read line | ||
do echo $line | ||
touch "$line" | ||
done | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
WordGirl - 1x01 - Tobey or Consequences High Fat Robbery.mp4 | ||
WordGirl - 1x02 - You Cant Crush City Hall Two Brain Highway.mp4 | ||
WordGirl - 1x03 - Coupon Madness When Life Gives You Potatoes.mp4 | ||
WordGirl - 1x04 - Jerky Jerk Becky's Birthday.mp4 | ||
WordGirl - 1x05 - Chuck Down With Word Up.mp4 | ||
WordGirl - 1x06 - Book Ends Mr. Big.mp4 | ||
WordGirl - 1x07 - Super Grounded Mouse Army.mp4 | ||
WordGirl - 1x08 - Tobey's Masterpiece Chuck the Nice Pencil Selling Guy.mp4 | ||
WordGirl - 1x09 - The Birthday Girl Granny Sitter.mp4 | ||
WordGirl - 1x10 - Mr. Big's Big Plan Vocab Bee.mp4 | ||
WordGirl - 1x11 - Shrinkin in the Ray Department Store Tobey.mp4 | ||
WordGirl - 1x12 - Chuck E Sneeze Swap Meat.mp4 | ||
WordGirl - 1x13 - Granny's Good Time All Cure Spritzer Mecha Mouse.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
# This script is for doing mass renamaning of media files. | ||
# Created on 20231001 | ||
|
||
clear | ||
|
||
### Funtions | ||
PDIR(){ | ||
read -p "Where the files located?: " files | ||
cd "$files" | ||
echo -e "\nAre these the files you want to rename?\n$(pwd)/\n$(ls)" | ||
case $YN in | ||
Y|y|yes) echo "yes" ;; | ||
N|n|[Nn]o) echo "Try again" ;; | ||
esac | ||
read -p "Is this correct? (Y/N): " YN | ||
} | ||
|
||
# Data Collection | ||
#read -p "Where the files located?: " files | ||
#cd "$files" | ||
|
||
#echo -e "\nAre these the files you want to rename?\n$(pwd)/\n$(ls)" | ||
|
||
#read -p "Is this correct? (Y/N): " YN | ||
#echo -e "$YN" | ||
|
||
#case $YN in | ||
# Y|y|yes) echo "yes" | ||
# ;; | ||
# N|n|[Nn]o) echo "Try again" | ||
# ;; | ||
#esac | ||
|
||
### Basic Script | ||
#case $choice in | ||
|
||
#ls | while read line | ||
#do echo $line | ||
## can use cp instead | ||
#mv "$line" "$(echo -e "$line" |sed -e 's///' -e 's///' )" | ||
#done | ||
|
||
# can use path | ||
#mv "$line" "/Users/<username>/Dowloads/$(echo -e "$line" |sed -e 's///' -e 's///' )" | ||
|
||
while true | ||
do | ||
PDIR | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
cat file.txt |while read o n | ||
do echo $o $n | ||
done | ||
|
||
ls *.mp4| while read line | ||
do echo $line | ||
echo -e "$line \t $(echo -e $line |sed 's/Word//')" | ||
done | ||
|
||
# Script for making the ummy files | ||
cat list.txt |while read line | ||
do echo $line | ||
touch "$line" | ||
done |