sitemanager.xml RemoteDir help

Need help with FileZilla Client? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
leroys
500 Command not understood
Posts: 2
Joined: 2023-01-24 17:03
First name: e
Last name: s

sitemanager.xml RemoteDir help

#1 Post by leroys » 2023-01-24 17:13

Hello,

We are switching from an old mainframe product to a new one which doesn't come with FTP so I wrote a script to copy all FTP sites from the old product to FileZilla

The script works great, except for copying the RemoteDir which looks like it uses a different path than LocalDir

Example:

C:\temp is:
<RemoteDir>3 0 2 C: 4 temp</RemoteDir>

SMP_PARTPDC_DV:[000000.U001090] is:
<RemoteDir>2 15 SMP_PARTPDC_DV: 6 000000 7 U001090</RemoteDir>

What language is this using? Is there anyway to convert it?

User avatar
botg
Site Admin
Posts: 35506
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: sitemanager.xml RemoteDir help

#2 Post by botg » 2023-01-24 18:42

It's a space-separated list.

First number is the server type as selected in the Site Manager. Second number is the length of the path prefix, and if non-zero, followed by the path prefix. Afterwards it's continuing with the segments in the path, for each segment it's length of the segment followed by the segment itself.

It's 2023, so all servers should out of the box use the Unix-like path syntax (servers that don't belong in museum).


The server-type number for Unix-like servers is 1.
Unix-like path syntax has no concept of path prefixes, so that part is always 0

Example path:

Code: Select all

/just/an/example path
This path has 3 segments, of 4, 2 and 12 characters each.

Putting it all together we get this:

Code: Select all

1 0 4 just 2 an 12 example path

leroys
500 Command not understood
Posts: 2
Joined: 2023-01-24 17:03
First name: e
Last name: s

Re: sitemanager.xml RemoteDir help

#3 Post by leroys » 2023-01-24 21:54

Thanks for the info and the quick response!

Post Reply