Files with absolute paths links - How to move them?

Page 1 of 3 123 LastLast

  1. Posts : 14
    Windows 7 32 bits
       #1

    Files with absolute paths links - How to move them?


    Hi guys,

    We have been using a labeling software from a laptop with Windows Vista for a long time. In that laptop we have thousands of labels stored that we open and edit with such software. Those labels contain logos of companies as absolute paths, that is C:\...\something.jpg , instead of embedding the image on the file.


    Now we have installed such software on newer PCs and moved those files to the new PCs. Consequently, the labels appear with the links to the logos broken.

    I don't know how to manage that.

    Can you give me a hand?

    Kind Regards,

    videoclocknet
      My Computer


  2. Posts : 14
    Windows 7 32 bits
    Thread Starter
       #2

    Just to say those images are on any folder of the C: unit from the laptop.
    There is no a folder that contains the set of images.
      My Computer


  3. Posts : 5,656
    Windows 7 Ultimate x64 SP1
       #3

    Do you copy to the same folders?
    Did you check permissions and ownership?

    Or perhaps your program on the old machine keep some paths and other information in some settings file of the sort? Did you check AppData, ProgData etc folders for where the program may keep them?
      My Computer


  4. Posts : 14
    Windows 7 32 bits
    Thread Starter
       #4

    The path that contains the labels files in the laptop can be the same as in the newer PCs. No problem with that. In fact, it's one folder in the desktop.

    However the path to the images must be different than in the laptop. Because of malpractice, each image is on a different path on the hard drive from the laptop.
      My Computer


  5. Posts : 5,656
    Windows 7 Ultimate x64 SP1
       #5

    I have hard time visualizing to be honest, perhaps because I am not very familiar with such software.
    Can you post some screenshots with some explanation? Screenshots and Files - Upload and Post in Seven Forums

    Why does the path must be different?

    There are 2 sets of files in question, right? A label file and an image file that it is linked to. You can copy the labels to the same C:\folder without issues. Why can't you copy the images to the same places as they were in the original install?
      My Computer


  6. Posts : 14
    Windows 7 32 bits
    Thread Starter
       #6

    I've discovered that this type of file is actually an XML, which is easy to read by an application!

    So now I would need some scripting that makes the following:

    1.- I insert a pendrive to the laptop
    2.- Create a folder on the parent folder of the pendrive
    3.- For each label file on the laptop,
    copy the label file to the just created folder of the pendrive
    look for any path inside that file. For each path
    Copy the file that is pointed by the path to the just created folder of the pendrive
    Rename such path on the new file from the pendrive to W:\name-of-the-image.jpg

    4.- On the new PC: create the W: unit drive.
    5.- Copy all the files from such folder of the pendrive to the W: unit

    I think this would work, right?
      My Computer


  7. Posts : 14
    Windows 7 32 bits
    Thread Starter
       #7

    Sorry, Gokay, I didn't see your post.

    There are two different types of files as you say: the label files, which are actually XML files. These files have some fields that are paths.

    The second type of files are images, which are actually jpg files.

    On the first type of files, it is written the path to the second type of files

    Sorry for my english. I didn't know how to explain it.
      My Computer


  8. Posts : 5,656
    Windows 7 Ultimate x64 SP1
       #8

    Hmm, yeah I guess the procedure you laid out should work.
    It should be easy to manually do one or two and see if everything is alright.
    Then someone here can make a script for you I am sure.
      My Computer


  9. Posts : 14
    Windows 7 32 bits
    Thread Starter
       #9

    Gokay, I really appreciate your help.

    I will test it with one or more files and share the results.
      My Computer


  10. Posts : 14
    Windows 7 32 bits
    Thread Starter
       #10

    Ei guys,

    1.- I've copied all the .itf files into my pendrive.
    2.- After that, I've copied one .jpg image to the pendrive.
    3.- I've opened one .itf file from the pendrive with notepad and changed the path to the logo, so now it points to the just copied .jpg image on the pendrive.
    4.- I've opened the just modified .itf file of the pendrive from another PC which has the labeling software installed and the newly copied jpg image appears as the logo in the label. So that method works!

    Now I need a script that makes the following:
    Parameters: [Input folder], [Output Folder]
    Algorithm:
    (I copy all the itf files to my pendrive before executing this algorithm, so we don't loose the initial files in case of an error)
    For each .itf file in [Input folder] and its subfolders, search for any tag called Filename inside the itf file and copy such file to the output folder. Then change the Filename tag of the itf file to [outputfolder\image-name.jpg]


    Here is a real example of a Filename tag in a .itf file:
    Code:
    <FileName>C:\Users\USUARIO 1\Desktop\colos create\LOGOS\avidur.jpg</FileName>
    And I attach a real itf file, so you can have an idea of what I'm looking for.
    Lineto T03 D12 N.itf.txt

    Can you give me a hand for creating such a script?

    Kind Regards
      My Computer


 
Page 1 of 3 123 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 22:50.
Find Us