I copied a lot of files from a FTP and I got some errors, which I exported into a collection.
I then thought I could simply copy the members from the collection to the destination lister and keep the structure.
I was expecting Directory Opus to show me a copy dialog asking me to recreate the folders, but if I copy the files from the collection, it just copy all of them flat in the current folder, without recreating any of the source folders.
I looked and found the following script which seems to help a lot and do the job:
It copies the structure, but the only issue, is it adds extra root folders with the FTP name.
It copies it to:
D:\Temp\backup\ftp\ftp.server.com\www\wp-content\uploads\index.php
I would have expected:
D:\Temp\backup\www\wp-content\uploads\index.php
I'm sure the script can be enhanced, but I wanted to know if there was a simpler way to do it without any script ? Shouldn't Directory Opus be able to handle this directly ?
FTR, I tried simple buttons like: @nofilenamequoting
Copy CREATEFOLDER="{destpath}{filepath$|..|noterm|noroot}"
but it creates a strange folder structure :
D:\Temp\Backup\Users\UserName\AppData\Local\Temp\dtemp-cb2fba70-1808978468-20.dop\index.php
There's no automatic way for Opus to guess which parts of the path you do/don't want.
If you don't want to modify the script to remove the unwanted parts, an easy alternative is to move everything after the copy, which shouldn't take more than a couple of seconds to do.
I understand this, but the protocol and the server address are not really useful when you try to replicate a folder structure from 1 place to another, keeping the ftp\servername.com is not helpful.
Without talking about the guessing of the path, is there a way for Directory Opus to recreate the folder structure without using an external script ?
I reckon the following should have handled the recreate structure without the protocol and the servername:
Copy CREATEFOLDER="{destpath}{filepath$|..|noterm|noroot}"
However it doesn't work properly for FTP apparently as I end up with the following path:
D:\Temp\Backup\Users\UserName\AppData\Local\Temp\dtemp-cb2fba70-1808978468-20.dop\index.php
thank you for the pointers, I'll try my luck.
What about the strange path that DO creates when I use this command ?
Copy CREATEFOLDER="{destpath}{filepath$|..|noterm|noroot}"
Shouldn't it work as expected ? Without the need to use scripts.