How to batch edit catalog directory path?
How to batch edit catalog directory path?
when I restore catalog data from other pc or os, I need to relocate many directory path with the same prefix path, i feel like a stupid manually relocate each path one by one, thinking there must be a way to do this but I don't know how... i tried googled this but not getting what i need.
Re: How to batch edit catalog directory path?
Thank you!
it helps replacing simple syntax with your code provided, but sql code is beyond my knowledge if i need to edit it with more function like incremental number, is there a way to export a specific table like this one into txt file, edit with a text editor then import the changes?
Re: How to batch edit catalog directory path?
try
1. place the following files in the same folder
3. modify export_folders.csv (edit only Pathname values and they must remain unique)
4. run import_folders.bat
1. place the following files in the same folder
- XnView.db
- sqlite3.exe from sqlite-tools-win-x64-3500400.zip download from sqlite3
- create files
- export_folders.bat
Code: Select all
sqlite3.exe XnView.db < export_folders.sql
- export_folders.sql
Code: Select all
.mode csv .separator "," .headers on .output export_folders.csv SELECT FolderID, Pathname FROM Folders; .output stdout
- import_folders.bat
Code: Select all
sqlite3.exe XnView.db < import_folders.sql
- import_folders.sql
Code: Select all
DELETE FROM Folders; .mode csv .separator "," .import export_folders.csv Folders UPDATE sqlite_sequence SET seq = (SELECT MAX(FolderID) FROM Folders) WHERE name = 'Folders';
- export_folders.bat
3. modify export_folders.csv (edit only Pathname values and they must remain unique)
4. run import_folders.bat