I have files coming in, where in the metadata, a link to the location is saved when creating the files by a user. Sometimes the user is using an unc path, and other times they are using a regular file path, e.g.:
\\tb-fp02\switch\DO Sample
T:\DO Sample
I have been using a custom nodejs script to move the files, but when trying to do the same with Archive hirearchy, things go wrong. The goal would be to not use a script to avoid any future problems with it.
When i try to move the files to a network drive via Archive hierarchy, the files that have the UNC path, go to a separately created "doubled hierarchy , not the one i set in the file hierarchy connector.
With the regular path, the hierarchy looks like this: T:;DO Sample;_Phoenix - this works
With the UNC path the hierachy looks like this: ;tb-fp02;switch;DO Sample - with this, the files are moved to a newly created folder: T:\tb-fp02\switch\DO Sample . Somehow the Archive hierarchy takes the correct regular path and adds it to the front of the job hierarchy.
I am thinking that maybe the problem is in the metadata, where the server address already exists in the first part of set hierarchy path. But with the regular path, it's not an issue.
What i have tried:
1. Use UNC or regular path as Archive hierarchy path. On both cases, the UNC one still created the double folders.
2. Set Archive hierarchy path as automanaged. Regular path worked, but the UNC path job got stuck in the automanaged folder.
3. I tried changing the Job.Hierachy metadata with string replace to fix the address, but it does nothing there. I tried both, dataset and private data options with (\;tb-fp02\;switch)=T: but nothing changed.
Not sure how to move forward. Maybe the nodejs script option is still the best one? Although i am not sure what continuation problems can arise with it.
Archive hierarchy moving files to wrong folder
-
- Member
- Posts: 134
- Joined: Fri Jun 12, 2020 11:23 am
- magnussandstrom
- Advanced member
- Posts: 510
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: Archive hierarchy moving files to wrong folder
In this scenario I would add Job.Hierarchy to a Private Data tag than use the app Private data magician to normalize the path.PdFUser5000 wrote: ↑Tue Sep 17, 2024 2:30 pm 3. I tried changing the Job.Hierachy metadata with string replace to fix the address, but it does nothing there. I tried both, dataset and private data options with (\;tb-fp02\;switch)=T: but nothing changed.
-
- Member
- Posts: 134
- Joined: Fri Jun 12, 2020 11:23 am
Re: Archive hierarchy moving files to wrong folder
How will this work, if the Archive Hierachy element only uses the Job.hierarchy data?magnussandstrom wrote: ↑Tue Sep 17, 2024 3:29 pmIn this scenario I would add Job.Hierarchy to a Private Data tag than use the app Private data magician to normalize the path.PdFUser5000 wrote: ↑Tue Sep 17, 2024 2:30 pm 3. I tried changing the Job.Hierachy metadata with string replace to fix the address, but it does nothing there. I tried both, dataset and private data options with (\;tb-fp02\;switch)=T: but nothing changed.
- magnussandstrom
- Advanced member
- Posts: 510
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: Archive hierarchy moving files to wrong folder
Sorry, I'm not sure I understand your workflow and problem.
When you say:
2. Are there several servers where the files could be placed (or is ther only one server but with different sub paths)?
When you say:
1. How is this achieved? How are the files "coming in" and in what metadata are the location path stored?PdFUser5000 wrote: ↑Tue Sep 17, 2024 2:30 pm I have files coming in, where in the metadata, a link to the location is saved when creating the files by a user.
2. Are there several servers where the files could be placed (or is ther only one server but with different sub paths)?