Trying to send files back to a directory that changes

Post Reply
jdold
Newbie
Posts: 13
Joined: Tue Feb 26, 2019 6:43 pm

Trying to send files back to a directory that changes

Post by jdold »

Hi
What I want to do is unzip files and have them sent back to where they came from.
Directory path would always be changing.
My idea was to have the directory path with 2 underscores added as a prefix to the name of the zipped file.
I can do that, not a problem.
Then drop it on a Switch folder.
Rename the zipped file back to Original, but have it log the directory path somehow.
Then unzip, and send it back to the directory path.

How can I get the directory path logged and the info back into the end of the flow to send it back?
Or does anybody have a better way to do it?

Thanks in advance.
unzip flow to send back.png
unzip flow to send back.png (9.92 KiB) Viewed 6168 times
saitok
Member
Posts: 63
Joined: Fri Apr 24, 2015 10:14 am
Location: Tokyo Japan

Re: Trying to send files back to a directory that changes

Post by saitok »

Hi,

How about using Job Private Date?
https://www.enfocus.com/manuals/UserGui ... older.html

I think you can use it to store the ZIP folder name before renaming back to the original like this:
ZIPname=[Job.Name]

At the end of the flow, you can get the value of the private data using the follwing variable:
[Job.PrivateData:Key="ZIPname"]
jdold
Newbie
Posts: 13
Joined: Tue Feb 26, 2019 6:43 pm

Re: Trying to send files back to a directory that changes

Post by jdold »

Hi saitok,
Thank you very much for your reply.
But I jumped the gun. My theory is flawed from start. Because I cannot add directory path as a prefix on the name of the zipped file.
I get -filename prefix contains one or more characters that are not valid in filenames.
I will have to rethink how to do this.

I liked the idea of the variable path and maybe I could still use it somehow. But I could not get it to execute.
At the end of the flow, it did not seem to take the variable as a path. The flow would not activate.
Maybe I was entering something wrong somewhere.
send back path.png
send back path.png (70.86 KiB) Viewed 6127 times
Last edited by jdold on Fri Jul 30, 2021 8:58 pm, edited 2 times in total.
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Trying to send files back to a directory that changes

Post by jan_suhr »

You have the variables [Job.Origin] and [Job.Path]

Maybe they can give you the answer.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
jdold
Newbie
Posts: 13
Joined: Tue Feb 26, 2019 6:43 pm

Re: Trying to send files back to a directory that changes

Post by jdold »

Hi jan-suhr,

Thank you for the reply.
I gave that a shot.
On the first folder under Set job private data I entered the variable -
OUTpath=[Job.Origin]
Then on the last outgoing folder in path, I entered -
[Job.PrivateData:Key="OUTpath"]
But flow will still not activate. The warning says the value of Path is not valid.
Where am I going wrong?
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Trying to send files back to a directory that changes

Post by jan_suhr »

Ok If I understand you right you want the last folder in your flow to have a variable path. You can't do that with an folder.

You have to use Set hierarchy path and Archive hierarchy instead.
With Set hierarchy path you use your variables for your path and then Archive hierarchy uses that path to save to disc with a defined root folder where your variable folders will be created.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
jdold
Newbie
Posts: 13
Joined: Tue Feb 26, 2019 6:43 pm

Re: Trying to send files back to a directory that changes

Post by jdold »

So in the first folder (Preflight_zip_file_IN) where I am sending my zipped files to I put OUTpath=[Job.Origin] in the set private data.
I'm not sure this is going to give me the original folder where my zipped files are coming from.
I think it is just going to point back to this folder Preflight_zip_file_IN.

If I am wrong here is my other issue:

In the Set Hierarchy path, I put
Action Add to top
Path segment 1 [Job.PrivateData:Key="OUTpath"]

In the last Archive Hierarchy flow element.
What would go in the Path?
flow.png
flow.png (50.09 KiB) Viewed 6067 times
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Trying to send files back to a directory that changes

Post by jan_suhr »

The Pah property is for the hierarchy root folder. Like MyDisk/Jobfolders/

And after that you have your folder structure for your jobs.

The path you get from the start already contains the first parts and you have to filter them out from that variable.
To the right you have After, Before, Segment and Search.

Look here:
https://www.enfocus.com/manuals/UserGui ... tions.html
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
jdold
Newbie
Posts: 13
Joined: Tue Feb 26, 2019 6:43 pm

Re: Trying to send files back to a directory that changes

Post by jdold »

Hi jan_suhr
Good news, I have it working now.
I had added some of the variables I needed on the original job name and then created private data for that.
I used that private data to set my hierarchy, using the filters before and also after.
Thank you for your replies and guidance.
Much appreciated.
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Trying to send files back to a directory that changes

Post by jan_suhr »

Great news! You're welcome
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Post Reply