make folders from files - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Mac OS X (https://forum.kodi.tv/forumdisplay.php?fid=56) +---- Thread: make folders from files (/showthread.php?tid=49190) |
make folders from files - schwallman - 2009-04-19 Ive done a quick search and found nothing. Anyone out there in mac land know of a way to go in a folder and make a folder for each file, name it the file name - the .ext, then move the said file into the new created folder. And do it numerous times until completed with the folder. so pretty much this but something terminal would understand...sorry new to macs. @echo on for %%a in (*.*) do ( md "%%~na" 2>nul move "%%a" "%%~na" ) - davilla - 2009-04-19 schwallman Wrote:Ive done a quick search and found nothing. Anyone out there in mac land know of a way to go in a folder and make a folder for each file, name it the file name - the .ext, then move the said file into the new created folder. And do it numerous times until completed with the folder. you do have bash at the command-line so you should be able to make a bash script to do this. - schwallman - 2009-04-19 Using the same windows command? - davilla - 2009-04-19 schwallman Wrote:Using the same windows command? http://en.wikipedia.org/wiki/Bash - schwallman - 2009-04-19 yeahhhhh, my head hurst from reading that - criti - 2009-04-19 i almost have it working in automator but no luck. - blittan - 2009-04-19 python is the way to go - touf99 - 2009-04-19 hello critit do you have the script of automator and if it yes can you send me i a m beginner thank you very much - schwallman - 2009-04-20 i know nothing about scripting on a mac or pc, but a friend at work made this for me to run on a pc, i would love to get it to work on my mac. i read the wiki about bash but just dont understand it. here it is for windows. @echo on for %%a in (*.*) do ( md "%%~na" 2>nul move "%%a" "%%~na" ) |