luispedrofonseca Posted December 9, 2014 Share Posted December 9, 2014 Hi guys, with my current pipeline I'd like to be able to on exporting my slices (1x, 2x, 3x) a folder action would kick in and sort all my exported files to their respective folders. Do you know any "easy" way to do this? I've been giving it a go with AppleScript but it's a pain to work with. Cheers! Quote Personal website - http://www.luispedrofonseca.com Follow me on Twitter - https://twitter.com/lpfonseca Link to comment Share on other sites More sharing options...
luispedrofonseca Posted December 9, 2014 Author Share Posted December 9, 2014 For anyone interested in the same thing (or similar) I ended up doing it as a shell script and it worked pretty great. You can always do an Automator Service so you can trigger it with a right-click on the folder. I'm sure there are easier/shorter ways to do it but this is working fine. :) #!/bin/bash # Creates folders to sort files exported by Affinity Designer mkdir -p images mkdir -p images/2x mkdir -p images/3x for file in ./*2x.png do if [ -f "$file" ] then newName=$(basename ${file/@2x}) mv $file images/2x/$newName fi done for file in ./*3x.png do if [ -f "$file" ] then newName=$(basename ${file/@3x}) mv $file images/3x/$newName fi done for file in ./*.png do if [ -f "$file" ] then mv $file images fi done Dale 1 Quote Personal website - http://www.luispedrofonseca.com Follow me on Twitter - https://twitter.com/lpfonseca Link to comment Share on other sites More sharing options...
luispedrofonseca Posted December 9, 2014 Author Share Posted December 9, 2014 Here's the service file just in case. AffinitySortFiles.zip Quote Personal website - http://www.luispedrofonseca.com Follow me on Twitter - https://twitter.com/lpfonseca Link to comment Share on other sites More sharing options...
Staff Ben Posted December 11, 2014 Staff Share Posted December 11, 2014 We'll improve slice export soon to include a little more control. luispedrofonseca 1 Quote SerifLabs team - Affinity Developer Software engineer - Photographer - Guitarist - Philosopher iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395 MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300 iPad Pro 10.5", 256GB Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.