0

I created the "Photos" column in the attribute table. Each line contains a unique path to a specific photo. For example:

D:/.../IMG0031.JPG

D:/.../IMG0048.JPG

Now I need to replace the path for each photo from drive D to drive C.

C:/.../IMG0031.JPG

C:/.../IMG0048.JPG

At the same time, the right side in each line should not change! What function should I use?

2

In the field calculator, you can use the replace function.

You could just replace the drive letter or also change the folder structure.

replace(src,'D:/','C:/')
replace(src,'D:/a/b/c','C:/x/y')

If the renaming is slightly more complex, I suggest saving the renamed path on a new column as errors could lead to hard to recover (or just unrecoverable!) data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.