Support #76

Container copy with file objects - keep orignal filename not temp name when using different fildir

Added by Andrew Little about 12 years ago. Updated almost 12 years ago.

Status:ClosedStart date:09/24/2012
Priority:NormalDue date:
Assignee:Pierre Marc% Done:

0%

Category:Application Platform
Target version:-
Operating System:Windows Tested:No
Version:4.7.002

Description

Hi

I have a container which contains several file objects, I want to be able to export or copy this container and change the filedir for the files but keep the original filenames.

Is this possible?

Currently I have to do this using a 3rd party procedure.

Concider this structure:
- <NVCONTAINER name="nvdef">
- <NVCONTAINER name="in">
- <NVOBJ name="copy_p_dat" type="FILE">
<NVNAME>copy.dat</NVNAME>
<NVEXTENSION>dat</NVEXTENSION>
<NVDIRECTORY>c:\temp\original</NVDIRECTORY>
<NVPATHNAME>c:\temp\original\copy.dat</NVPATHNAME>
<NVSIZE>1190037</NVSIZE>
<NVORIGIN>copy.dat</NVORIGIN>
</NVOBJ>
- <NVOBJ name="copy_p_dat_p_jpg1" type="FILE">
<NVNAME>COPY.DAT.jpg1</NVNAME>
<NVEXTENSION>jpg1</NVEXTENSION>
<NVDIRECTORY>c:\temp\original</NVDIRECTORY>
<NVPATHNAME>c:\temp\original\COPY.DAT.jpg1</NVPATHNAME>
<NVSIZE>1190037</NVSIZE>
<NVORIGIN>COPY.DAT.jpg1</NVORIGIN>
</NVOBJ>
</NVCONTAINER>

Using command
NV_CMD=|container:copy| filedir=|c:\temp\moved\out| nv_in_container=|nvdef.in| nv_out_container=|nvdef.out| persist=|-1|

What I would like to achive is this structure
- <NVCONTAINER name="nvdef">
+ <NVCONTAINER name="in">
- <NVCONTAINER name="out">
- <NVOBJ name="copy_p_dat" type="FILE">
<NVNAME>copy.dat</NVNAME>
<NVEXTENSION>dat</NVEXTENSION>
<NVDIRECTORY>c:\temp\moved</NVDIRECTORY>
<NVPATHNAME>c:\temp\moved\copy.dat</NVPATHNAME>
<NVSIZE>1190037</NVSIZE>
<NVORIGIN>copy.dat</NVORIGIN>
</NVOBJ>
- <NVOBJ name="copy_p_dat_p_jpg1" type="FILE">
<NVNAME>COPY.DAT.jpg1</NVNAME>
<NVEXTENSION>jpg1</NVEXTENSION>
<NVDIRECTORY>c:\temp\moved</NVDIRECTORY>
<NVPATHNAME>c:\temp\moved\COPY.DAT.jpg1</NVPATHNAME>
<NVSIZE>1190037</NVSIZE>
<NVORIGIN>COPY.DAT.jpg1</NVORIGIN>
</NVOBJ>
</NVCONTAINER>

What I actually received
- <NVCONTAINER name="nvdef">
+ <NVCONTAINER name="in">
- <NVCONTAINER name="out">
- <NVOBJ name="copy_p_dat" type="FILE">
<NVNAME>0000002d0a181241.dat</NVNAME>
<NVEXTENSION>dat</NVEXTENSION>
<NVDIRECTORY>c:\temp\moved\out</NVDIRECTORY>
<NVPATHNAME>c:\temp\moved\out\0000002d0a181241.dat</NVPATHNAME>
<NVSIZE>1190037</NVSIZE>
<NVORIGIN>copy.dat</NVORIGIN>
</NVOBJ>
- <NVOBJ name="copy_p_dat_p_jpg1" type="FILE">
<NVNAME>0000002e0a181c9d.jpg1</NVNAME>
<NVEXTENSION>jpg1</NVEXTENSION>
<NVDIRECTORY>c:\temp\moved\out</NVDIRECTORY>
<NVPATHNAME>c:\temp\moved\out\0000002e0a181c9d.jpg1</NVPATHNAME>
<NVSIZE>1190037</NVSIZE>
<NVORIGIN>COPY.DAT.jpg1</NVORIGIN>
</NVOBJ>

This shows the extension is kept from the original filename, can we have a parameter that will allow the original name to be used as well or is there a way to do this already?

History

#1 Updated by Pierre Marc about 12 years ago

  • Status changed from New to In Progress
  • Assignee set to Pierre Marc

Hi,

The file objects in Nirva have to be considered as pointers to the real files. In some cases, Nirva can generate the physical file but at this time, it must assumes that the name is unique in the target directory in order for the command to work properly. If you want specific filenames, you are responsible for managing the filenames from your application.
For doing a container copy by keeping the filenames, you must first copy yourself the files in the target directory, do the container copy with the FILES parameter set to "NO" and loop the target file object for changing the file name using the OBJECT:FILE_SET_FILENAME command. There is also probably another way by using the APPLICATION:DIR command on the target directory.

#2 Updated by Pierre Marc almost 12 years ago

Hi Andrew,

I'd like to know if I can close this issue.

Regards

Pierre

#3 Updated by Pierre Marc almost 12 years ago

The case has been closed without answer from customer.

#4 Updated by Pierre Marc almost 12 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF