-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathd_jpeg_mv.sh
45 lines (40 loc) · 1.42 KB
/
d_jpeg_mv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
#script written by Raelene Casey 2024
echo 'PLEASE READ TERMINAL OUTPUT CAREFULLY'
#check if the current folder contains any files with jpg extension.
#If it does then create two folders and move the jpg files to one of them
if ls *.jpg 1> /dev/null 2>&1; then
mkdir metadata_jpeg
mkdir objects_jpeg
mv *.jpg ./objects_jpeg
else
echo 'no file with jpg extension is present in current directory'
fi
#check if the current folder contains any files with jpeg extension.
#If it does then create two folders and move the jpeg files to one of them.
if ls *.jpeg 1> /dev/null 2>&1; then
mkdir metadata_jpeg
mkdir objects_jpeg
mv *.jpeg ./objects_jpeg
else
echo 'no file with jpeg extension is present in current directory'
fi
#check if the current folder contains any files with JPG extension.
#If it does then create two folders and move the JPG files to one of them.
if ls *.JPG 1> /dev/null 2>&1; then
mkdir metadata_jpeg
mkdir objects_jpeg
mv *.JPG ./objects_jpeg
else
echo 'no file with JPG extension is present in current directory'
fi
#check if the current folder contains any files with JPEG extension.
#If it does then create two folders and move the JPEG files to one of them.
if ls *.JPEG 1> /dev/null 2>&1; then
mkdir metadata_jpeg
mkdir objects_jpeg
mv *.JPEG ./objects_jpeg
else
echo 'no file with JPEG extension is present in current directory'
fi
echo 'THIS SCRIPT IS NOT RECURSIVE'