Timeline for How do I delete files with spaces in them in bash script?
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 18, 2013 at 18:29 | comment | added | glenn jackman | You can get rid of the if statement if you use for FILE in $LOCATION/*.mp3 | |
| Dec 8, 2013 at 1:06 | review | Suggested edits | |||
| Dec 8, 2013 at 5:53 | |||||
| Dec 7, 2013 at 21:28 | comment | added | uxserx-bw | I am using ffmpeg to converting mp3s to 128K giving them a new name with underscores to replace all the spaces and junk between the names in the file, then making directories according to there artist album metadata then putting them into said directories. I just had that problem of getting rid of the old file due to all the spaces and junk between the names of the artist and such. now it is working great and converting, placing new mp3's where they need to be and getting rid of the old file while I just sit here thinking of something else to write in bash script :D thanks! | |
| Dec 7, 2013 at 21:04 | comment | added | just some user | No problem. If you don't need to rename the file first you could also solve it with find . -maxdepth 1 -type f -name '* *' -delete | |
| Dec 7, 2013 at 20:43 | review | First posts | |||
| Dec 7, 2013 at 20:43 | |||||
| Dec 7, 2013 at 20:35 | comment | added | uxserx-bw | thank you for taking you time to actually read my code to see what was going on. even thought I figured out a different way to do it with three lines of code within a loop as I added it to the rest of my script killfile="${pref}.${ext}" mv "$killfile" "${killfile//*/killme.k}" rm "killme.k" | |
| Dec 7, 2013 at 20:24 | history | answered | just some user | CC BY-SA 3.0 |