2 Documents into the same dynamically named folder.....

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Hi All, heres what Im trying to do.....

I have a invoice file and a timesheet file - both pdf's held in separate folders at the same level. I need to rename them and save them both into the same folder...BUT the final sub folder needs to be named using the same format as the invoice....

So far I have managed to save the invoice to a format InvXXX.pdf using a reference in the existing filename.
Using "sort into subfolder", I move this into a sub folder of the invoice folder named from the date of invoice using custom tokens. YYYY_MM_DD - InvoiceXXX.
The timesheet comes into another folder and I have successfully renamed this to YYYY_MM_DD to YYY_MM_DD+4 Inclusive based on its created date so filename comes out at something like "2017_02_10 to 2017_02_14 Inclusive.pdf" - so far so good.....

I now cannot figure out how to move it to the subfolder that now holds the invoice....

Ive tried a rules against the timesheet folder that moves the timesheet to the invoice folder then added a rule to the invoice folders ruleset to sort into subfolder if its not an invoice but it errors with a source and target are the same message....

I fully appreciate that this may not make 100% sense so happy to clarify - been looking at it too long I think....
kevlad911
 
Posts: 14
Joined: Fri Oct 21, 2016 9:45 am

It's not clear to me how you know a timesheet correlates with a particular invoice file. It seems the names contain nothing in common. Can you elaborate a bit more? Maybe do a walkthrough of an example file through this workflow?
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thanks for having a look at this one.....I'll try to explain....

I invoice once per week and the invoice is submitted to the client with a time sheet. Either of these things can be created at any point between Friday and Monday and both relate to the previous week but both need to go to the client together.

The invoice is created from the tool I use as format Invoice_001_yyyy_mm_ddd.pdf.
I save this manually into the folder "temp invoice"
within the rule set I:
Capture the invoice number and the date
Rename the invoice to Invxxx.pdf
Sort the invoice into a subfolder named yyyy_mm_dd - Invoicexxx

The date in the subfolder name is always the Friday of the week to which the time sheet relates. To do this, I have a rules for Fri, Sat, Sun, Mon which then subtract a number of days from the date the PDF was created to take the date back to Friday. These work....

The timesheet is manually dropped into "temp timesheet" which is at the same level as the temp invoice folder and gets renamed to "Timesheet yyyy_mm_ddd to yyyy_mm_dd Inclusive" where the first date is the Friday and the second is the previous Monday (using the same method as setting the invoice date). This works....

So now that the dates match on the invoice and the timesheet, I now need to get them into the same subfolder.....this is where I'm coming unstuck.....

I can control when both invoice and timesheet are downloaded. At the moment my thought process is to use the invoice first....

The objective is to rename them using the conventions above and put them both into the same subfolder, also named as above (all dates moved to the Friday). I completely accept that I may have looked at this problem from completely the wrong angle..... :D
kevlad911
 
Posts: 14
Joined: Fri Oct 21, 2016 9:45 am

If the two files share a date in the name, in addition to the folder you want to file both of them in, you can try using that. Use Sort into subfolder with a pattern which matches the common folder. Or maybe I'm missing something here.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Ok, I'm not explaining the issue well.

In terms of folders and files, I can get this far:
Temp invoice/yyyy_mm_dd - Invoicexxx/invoicexxx.pdf
Temp time sheet/timesheet yyyy_mm_dd to yyyy_mm_dd(-4).PDF

I then move the timesheet to temp invoice folder (subfolder rule won't work as It seems to only move to a subfolder based on current location so I move the file to where the subfolder is)
A rule against the temp invoice folder is supposed to move the timesheet into the subfolder.....but it doesn't.... in the show rule status window I get an error against the timesheet..... "Could not move (timesheet filename). Source and destination are the same"......
kevlad911
 
Posts: 14
Joined: Fri Oct 21, 2016 9:45 am

Ive managed to resolve the issue..... Problem was within the matching rule to find the subfolder to move the timesheet into after it had been created using info form the invoice. I had used the '...' custom token for the folder matching as the invoice number would change weekly but it didn't like this.....so.....

I adjusted the rules to create the subfolder with just the Friday date (Mr Noodles point about common dates triggered the thinking so thank you), moved both of the files into it THEN renamed it with the date + invoice number. Must have been an ordering issue.

Thanks for your help.
kevlad911
 
Posts: 14
Joined: Fri Oct 21, 2016 9:45 am


Return to Support