Page 1 of 1

Trying to send files back to a directory that changes

Posted: Thu Jul 29, 2021 8:13 pm
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 6708 times

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

Posted: Fri Jul 30, 2021 9:23 am
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"]

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

Posted: Fri Jul 30, 2021 5:55 pm
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 6667 times

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

Posted: Fri Jul 30, 2021 8:46 pm
by jan_suhr
You have the variables [Job.Origin] and [Job.Path]

Maybe they can give you the answer.

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

Posted: Fri Jul 30, 2021 10:07 pm
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?

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

Posted: Sat Jul 31, 2021 8:41 am
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.

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

Posted: Mon Aug 02, 2021 3:30 pm
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 6607 times

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

Posted: Mon Aug 02, 2021 4:00 pm
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

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

Posted: Tue Aug 03, 2021 5:54 pm
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.

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

Posted: Tue Aug 03, 2021 5:57 pm
by jan_suhr
Great news! You're welcome