WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> How to... >> Remove date from file name
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1430406081

Message started by Brandon Cathey on Apr 30th, 2015 at 5:01pm

Title: Remove date from file name
Post by Brandon Cathey on Apr 30th, 2015 at 5:01pm
How can I setup Watch Directory to remove a date from a set of files.  For instance, I have 3 files as follows:
Peanut Butter 16_Apr_2015_08_17_00_900.pdf
Jelly 16_Apr_2015_08_14_00_897.pdf
Bread 16_Apr_2015_08_34_43_063.pdf
I want to end up with:
Peanut Butter.pdf
Jelly.pdf
Bread.pdf
Help Please!

Title: Re: Remove date from file name
Post by Gert on May 1st, 2015 at 6:52am
Brandon,

When you use {dynamic naming} (see http://www.watchdirectory.net/wdhelp/plugins/dynamicname_functions.html ) with, for example, the "copy files" plugin, there are several ways to do this.

If this timestamp is always 25 characters long, use a dynamic name like this to cut the last 25 chars from the name:

C:\Target\Dir\{cutright{25,{filetitle}}}.{extension}


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