Archive hierarchy moving files to wrong folder
Posted: 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. 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.
\\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.