GP SoftwareTwitter
Opus FAQsManualCommandsObjects

FTP Navigation lock smarter Option?

I set up navigation lock in FTP. It's obviously a great feature, almost indispensable when working with FTP.
I am trying to phase out Adobe suite from my workflow and one thing I still use (Beside Photoshop, Illustrator and Premiere) is Dreamweaver.
There used to be a time when I used Dreamweaver far more, but since many of the tools it has have shown up directly in the browser console, I have little need to launch such a huge program just to upload and download files.

However, DW has a feature that even many dedicated FTP programs don't have. I'll try to explain it.

For starters, DW remote and local windows both work just like the Folder Tree does in D-opus, except that DW shows not just the directories, but the files therein as well. That's going to be key.

One thing that does is that if I want to upload or download a file I don't need to go to both sides, navigate to its folder, then upload, then navigate to another folder, upload again, etc.
In DW I can Ctrl-Click files in separate folders, then click the "upload" (or download) button and each file will go to its proper directory.

In other words, in DW I can choose a file or folder in the "local" directory, no matter how deep, I can click "upload" and DW knows exactly where to put it. I am so used to this that many time, using Filezilla, I screwed up and uploaded a file/folder to the server's top level under public_html.

I am sure a feature like this, missing in many top flight single purpose FTP programs is way too much to ask D-opus, but I have learned to ask before assuming something is not possible.
DW has had its FTP work like this for going on 30 years almost. So far it's the only FTP program of this kind. But maybe...?

A script could change the paths as needed, like in this demo:

function OnClick(clickData) {
    var cmd = clickData.func.command;
    var tab = clickData.func.sourcetab;

    cmd.deselect = false; // Prevent automatic deselection
    cmd.RunCommand('Set UTILITY=otherlog');
    DOpus.ClearOutput();

    var localRoot = 'D:\\User\\tesT\\';
    var targetRoot = 'ftp://192.168.1.1:9999//what//ever//';

    for (var eSel = new Enumerator(tab.selected); !eSel.atEnd(); eSel.moveNext()) {
        var localPath = String(eSel.item().realpath);
        var targetPath = localPath.replace(localRoot, targetRoot);
        var cmdLine = 'Copy "' + localPath + '" TO="' + targetPath + '"';
        DOpus.Output(cmdLine);
        // cmd.RunCommand(cmdLine);
    }
}

UploadToFtp.dcf (1.5 KB)

Adapt the root folders to your requirements (backslashes need to be escaped in JScript).

Un-comment the last line if you like the results. The script could be expanded to automatically determine the target path from the lister's destination. Downloads would be similar.

2 Likes

Thank you. I'll give it a try.