Forum

Author Topic: Change filename of photos, and update/maintain path in photoscan?  (Read 4735 times)

Rensefar

  • Newbie
  • *
  • Posts: 3
    • View Profile
Hi

I need to change the filenames of several photos, used for different models.
If i change the filename in the windows folder, photoscan understandably complains : can't load image: C:/path..

Can it be done in some clever, preferably easy way, without having to batch rename all photos and redo all projects?
- The name of the files (photos) needs to be changed in the folders, not just the way they are displayed in photoscan..

example of content in the windows folder:

original name:   
DSC_7360.JPG   
DSC_7361.JPG   
DSC_7364.JPG   

Needs to be renamed to:
F2113.JPG
F2114.JPG
F2115.JPG



/R


LFSantosgeo

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: Change filename of photos, and update/maintain path in photoscan?
« Reply #1 on: November 27, 2017, 04:17:33 PM »
Hi

I need to change the filenames of several photos, used for different models.
If i change the filename in the windows folder, photoscan understandably complains : can't load image: C:/path..

Can it be done in some clever, preferably easy way, without having to batch rename all photos and redo all projects?
- The name of the files (photos) needs to be changed in the folders, not just the way they are displayed in photoscan..

example of content in the windows folder:

original name:   
DSC_7360.JPG   
DSC_7361.JPG   
DSC_7364.JPG   

Needs to be renamed to:
F2113.JPG
F2114.JPG
F2115.JPG



/R

Have you progressed in any way on this matter? In my case I have to change the file path to my photos...
Luiz Fernando

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Change filename of photos, and update/maintain path in photoscan?
« Reply #2 on: November 27, 2017, 04:52:44 PM »
Hello lfsantosgeo,

You can do it either via Python, or by modifying the doc.xml contents in chunk.zip and frame.zip archives inside the project.files structure.
Best regards,
Alexey Pasumansky,
Agisoft LLC

LFSantosgeo

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: Change filename of photos, and update/maintain path in photoscan?
« Reply #3 on: November 28, 2017, 07:18:36 PM »
Hello lfsantosgeo,

You can do it either via Python, or by modifying the doc.xml contents in chunk.zip and frame.zip archives inside the project.files structure.

Thank you Alexey for the help. I've changed the file path through the change path... in the photography pane. Nevertheless this would be a very easy way to change it too.
Luiz Fernando

mallesh

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Change filename of photos, and update/maintain path in photoscan?
« Reply #4 on: December 21, 2017, 02:22:28 PM »
Could you please let me know, how could I replace my photo path. I could great if you could share a screenshot.

I tried a python script but could not succeed.

chunk = PhotoScan.app.document.chunk
for i in range (len(chunk.cameras)):
    chunk.cameras.frames[0].photo.path = chunk.cameras.photo.path.replace(".jpg", ".tiff")

I am using PhotoScan 1.2.7 build 3263.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Change filename of photos, and update/maintain path in photoscan?
« Reply #5 on: December 21, 2017, 02:59:25 PM »
Hello mallesh,

Please check the solution published in the related thread in Python sub-forum:
http://www.agisoft.com/forum/index.php?topic=8096.msg38691#msg38691

Best regards,
Alexey Pasumansky,
Agisoft LLC