WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> Plugins >> How to copy and rename the same file twice
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1358451295

Message started by presley on Jan 17th, 2013 at 8:34pm

Title: How to copy and rename the same file twice
Post by presley on Jan 17th, 2013 at 8:34pm
What I would like to do is take a file ( image.jpg ) and end up with two files named image_thumb.jpg and image_still.jpg, then FTP both of these newly named files somewhere.  Both new files are exactly the same file as the original, just have two new ( and different) filenames.   All input files will be *.jpg, ie:  11111111.jpg, 12345678.jpg, etc.  All output would be *_thumb.jpg and *_still.jpg  ie:  1111111_still.jpg and 1111111_thumb.jpg.

Can I do that?

Thank you for your time!

Jim P

Title: Re: How to copy and rename the same file twice
Post by Gert on Jan 18th, 2013 at 10:33am
Hello Jim,

Use the Sort Files task - http://www.watchdirectory.net/wdhelp/plugins/wdopAutoSort.html
Create 2 sort rules (make sure they are not "final rules" so they both will run), the first rule uses the target C:\target\{filetitle}_still.{extension} and the other C:\target\{filetitle}_thumb.{extension}
Create another task using the upload plugin to monitor c:\target.

Gert

Title: Re: How to copy and rename the same file twice
Post by presley on Jan 19th, 2013 at 1:16am
Thank you Gert, works like a dream!

Best regards,

Jim P

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.