AnsweredAssumed Answered

Path conversion and node export [SOLVED]

Question asked by jimcornmell on Feb 20, 2008
Latest reply on Feb 21, 2008 by jimcornmell
Hi All,

Simple question.  I'm trying to export some files from Alfresco 2.1 (in a tar etc) using Java.  To do this I have created an action which fires when files are placed into a folder (by an advanced workflow).  All is working fine so far.  The files are in a known folder, the action is fired, the java runs and knows the full path to the file which caused the action to fire.  Within the tar I need to include other files (which I know the path of).  Here is my problem:

I know the full paths to a bunch of files:

Company Home/SomeFolder/SomeOtherFolderEtc/SomeFileName.txt
Company Home/SomeFolder/SomeOtherFolderEtc/SomeFileName.xml
Company Home/SomeFolder/SomeOtherFolderEtc/SomeFileName.eps
Company Home/SomeFolder/SomeOtherFolderEtc/
Company Home/SomeFolder/SomeOtherFolderEtc/SomeFileName.log
Company Home/SomeFolder/SomeOtherFolderEtc/SomeFileName.etc

but now I need to A) convert these paths into node refs and B) get a file handle (from the node ref in A) on each file so I can save locally (and then run tar etc….).

Does anyone know how I can do A and B?