I’m currently using the split command to split a large file into many 50MB files. For example:
split -b50m filename.ext filename.ext.
This works really well, but I’d like to use Automator to create an application that I can give to a friend who is less familiar with the command line.
I realise that there are existing applications which can handle this (e.g. Split&Concat), but I want to use this as an opportunity to learn about Automator. This is what I would like to achieve:
- Drop file on application icon (e.g. filename.ext)
- Split files and name them filename.ext.aa, filename.ext.ab, …
- Create new files in same location as original file
How do I pass the file name to the command line?
When you save the Automator script as an Application the dropped file is passed to the first action automatically.
Select the Run Shell Script pass the input in as an arguments and access it using
$@.You can use the above

splitcommand instead. The following Automator takes the input file and moves it to the~/Desktop/hahafolder.