WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Automation of File Movement - Pattern based (Read 143 times)
Ken White
YaBB Newbies
*
Offline



Posts: 1
Automation of File Movement - Pattern based
Aug 2nd, 2017 at 8:05pm
 
Here's my request.  I need to automate the movement of files from one directory to another based on filename patterns and create a directory at the same time.

Files exists in SOURCE (PDF) that is 9+ characters long (i.e. 123456789 John Doe File.pdf
1L1345681 Jane Doe Flyer Type.pdf

I need to have the system scan all the files in the folder for the first 9 characters only.   (These are case files for our court).   From there I need it to scan the DESTINATION folder where it will look for the first 9 characters of ANY folder that is present, if it exists move the file(s) into that folder.  If it does NOT exist, create a new folder at the destination using ONLY the first 9 characters of the file and move ANY file that has those first 9 characters at the source into that destination.

Scenario 1:
123456789 ABC Court Case.pdf
123456789 DUI Trial Example.pdf
Folder on destination doesn't exist so create 123456789 on destination location and move ALL files that start with 123456789 to the new folder. 

Scenerio 2:
123456789 ABC Court Case.pdf
123456789 DUI Trial Example.pdf

Folder exists at destination called 123456789 John, Doe Case XYZ

Move all files that start with 123456789 to the 123456789 JOhn,Doe Case XYZ folder

-----------------------------------------
All of our files begin with 9 Characters which are the case numbers.  we need to move these into existing folders that ALSO start w/ these 9 characters (could include a letter but always 9 characters).  If the folder doesn't exist, create a folder matching the first 9 characters then move all files that start w/ those 9 to the newly created folder.  This needs to run 24x7 every 15 minutes.

We are hoping this software will work. if so, we are a customer Smiley

Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2232
The Netherlands
Re: Automation of File Movement - Pattern based
Reply #1 - Aug 3rd, 2017 at 7:39am
 
Hi,

It sounds like you can easily do this using {dynamic naming}, see http://www.watchdirectory.net/wdhelp/plugins/dynamicname_functions.html

Use something like this for the target:
C:\Target\{left{9,{filetitle}}}\{filename}

{left{9,{filetitle}}} returns the first 9 characters of the filename
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1