I did it in two commands --- one for splitting, and one for moving. I can't seem to find my way around it such as to have it all done with one line. What I did was:
split.exe --bytes=2300k -d 01_somefile.mp3 01_somefile.mp3 to get 01_somefile.mp301, 01_somefile.mp302, 01_somefile.mp303, and so on. Then
for file in *0?; do mv "$file" "$file.mp3"; done to have them all back as mp3.
I would appreciate if someone could help me with an one liner for this that loops through the directory and does this splitting and renaming. I am still poor with the commands. I've tried this:
for file in *.MP3; do split.exe --bytes=2500k -d "$file" "$file" && mv "$file" "$file".mp3; done I want to ask how can I control the name of the resulting pieces. Say, I have this file in the dir: 01_dickens_copperfield.mp3, next to 02.dickens_copperfield.mp3 and so on. I'm still finding them large and want them broken to other pieces and finally, want them renamed as .mp3
Doing
for file in *.MP3; do split.exe --bytes=2500k -d "$file" "$file"; done produces the files 01_dickens_copperfield.mp301, 01_dickens_copperfield.mp302, 01_dickens_copperfield.mp303, and so on. Next, doing
for file in *.*; do mv "$file" "$file".mp3; done gives: 01_dickens-copperfield.mp301.mp3, 01_dickens_copperfield.mp302.mp3, *.mp3ac.mp3 and so on.
How do I tell it to split the file into files having the original name but not the extension. Let mv add extention. Sorry for such lenghty expose. I am learning my way into this beautiful jungle but full of powerful animals such as these split, mv.