|
How do I make new folders with the name of all the
files in a folder without the file extension in the folder name, then move
the files in to there corresponding folder in Fedora 24 Linux?
Example: File0.mp4
Folders created:
Then move files in to folders. Suggested Answer: Manually mkdir File0 File1
Automated Bash Script #!/bin/bash # change to your directory name yourdir="/export/home/nails/s1"
# find files ONLY IN THE CURRENT DIRECTORY
find . ! -name . -prune -type f| while read myfile do
|
|
See Also
Have a Linux Problem
Linux Books
Home Index
(c) www.gotothings.com All material on this site is Copyright.
|