Skip to content

Instantly share code, notes, and snippets.

@pwaldhauer
Last active January 11, 2016 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwaldhauer/1d31d546f1e333a711f0 to your computer and use it in GitHub Desktop.
Save pwaldhauer/1d31d546f1e333a711f0 to your computer and use it in GitHub Desktop.
var source_path = [doc askForUserInput:"Source Path for Layers" initialValue:"/Users/pwaldhauer/Dropbox/Bilder/exported/fb_/"]
var destination_path = [doc askForUserInput:"Destination Path" initialValue:"/Users/pwaldhauer/Dropbox/Bilder/exported/fb_auswahl/"]
for (var i=0; i<selection.count(); i++) {
var layer = selection[i];
print([layer name]);
var source = [NSString stringWithFormat:"%@%@.jpg", source_path, [layer name]];
var dest = [NSString stringWithFormat:"%@%@.jpg", destination_path, [layer name]];
print(source);
print(dest)
[[NSFileManager defaultManager] copyItemAtPath:source toPath:dest error:nil];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment