I made a small and very simple plugin to quickly upload and download files from a single FTP server. The zip archive with the DLL and a simple readme can be found here:
(not exactly SourceForge but it does the job)
Tell me what you think about it.
This exact post is also in FTP thread, but I think its being missed since Ive seen numerous people request it.
PS donho,I saw somewhere you mentioned notifying the plugin when notepad++ has saved a file, could you implement that so the plugin can auto-upload? Or is it already available?
I'd like to sync them between workstation and laptop, where are the settings saved ?
In the COnfig folder,either in Program Files\Notepad++\plugins\Config or in Application Data\Notepad++\plugins\Config
(you can reach application data by browsing to %APPDATA%)
That looks nice!
Unfortunately, it doesn't work for me: in the messages window, I see the following:
Response (331): Password required for vor0nwe.
Response (230): User vor0nwe logged in.
Response (257): "/vor0nwe" is current directory.
But in the FTP Folders list, I only see the '/' root folder. I can't navigate to the writeable folders which are all under /vor0nwe/...
Could you fix this?
Another issue: while connecting to the FTP server, Notepad++ doesn't respond any more. Could you have your FTP access occur on a separate thread or something, to prevent it from blocking the entire app?
Also, when I try to connect to the FTP server and it times out, Notepad++ never comes back to life...
Thank you for your reply. I know of the login threading issue, ill add a seperate thread for it and some timeout checks (currently, there are some INFINITE waits because all servers I tested with were very reliable, mistake of me, the Internet is very unreliable). As for the '/' issue, could you give me some more info? For example, how a part of you directory _should_ look and what server you use (if you can, try loggin in with some other FTP application, usually itll display what servre is running), maybe it uses some format I havent seen yet (if its a public server, could you give the address).
Well, when I connect using FileZilla, I get the following log:
[16:59:38] Status: Connected with www.server.com. Waiting for welcome message...
[16:59:38] Response: 220 Microsoft FTP Service
[16:59:38] Command: USER name
[16:59:39] Response: 331 Password required for name.
[16:59:39] Command: PASS *****
[16:59:39] Response: 230 User name logged in.
[16:59:39] Command: FEAT
[16:59:39] Response: 211-FEAT
[16:59:39] Response: SIZE
[16:59:39] Response: MDTM
[16:59:39] Response: 211 END
[16:59:39] Command: SYST
[16:59:39] Response: 215 Windows_NT
[16:59:39] Status: Connected
[16:59:39] Status: Retrieving directory listing...
[16:59:39] Command: PWD
[16:59:40] Response: 257 "/" is current directory.
[16:59:40] Command: LIST
[16:59:40] Response: 125 Data connection already open; Transfer starting.
[16:59:41] Response: 226 Transfer complete.
[16:59:41] Status: Directory listing successful
So it would seem the root folder is indeed "/". I'd expect the subfolders to be shown, however. The listing I get when using Windows' command-line FTP client:
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
06-10-07 06:33AM <DIR> coppoolse.com
06-10-07 08:08AM <DIR> martijn.coppoolse.com
06-09-07 09:28PM <DIR> tolkienlist.net
226 Transfer complete.
(which corresponds with the folders listed in FileZilla)
Thanks for looking into it!
Doesnt the tree show a small '+' next to the '/' directory? Its hould always show and disappear when no subdirectories arent present, it doesnt expand by default, considering the log you psoted of the plugin doesnt show any directory access replies (atleast 1 passive connection should be made)
Well, yes, it does show a little plus next to the root. When I expand that, the following is added to the log...
Response (257): "/vor0nwe" is current directory.
Response (250): CWD command successful.
Response (227): Entering Passive Mode (72,35,94,15,4,34).
Response (200): Type set to A.
Response (125): Data connection already open; Transfer starting.
Response (226): Transfer complete.
Response (250): CWD command successful.
...and the plus sign disappears. However, no additional folders show up.
It's funny also that the message log says "/vor0nwe" is the current directory, whereas the folder list only shows "/". I'd like to try to go up one folder, but the UI doesn't provide that option.
Yeah its quite confusing, it will always show '/' as main folder instead of the '/vor0nwe' you expect. Ill rebuild it with the root showing the full path. The reason I chose the '/' was because the root can get quite lengthy if its deep inside the directorytree, might make an option out of it. Do you have any private message channels? I dont think this forum is meant for this type of discussion, although I do not mind posting here :P.
Ill post a debug version showing what directory data is being recieved and what text the app sends to the server, if you can copy that and give it to me it would help a great deal (if the + jsut disappears it means its unable to parse any directory of the given list (or the list is empty, in which case the requests are bad)). Im currently fixing the timeout, or atleast trying to :P
You can send me e-mail at my sourceforge.net address: vor0nwe @at@ users.sourceforge.net.
I updated the plugin, its mroe stable and adds needed functionality, you can now manage the files a bit more.
Please change the design. It's ugly! It do not fit into Notepad++ style! Add for example a toolbar into your plugin to add the upload and download icons. Use at best icons from famfamfam for your plugin:
Regarding the clear button. Please think about to find another solution. Maybe right mouse botton menu to clear/copy the log messages.
would be nice to give the source code so people can improve it, maybe make a project.
@Jens: Im working the fast I can to fix what you said. I wasnt aware of the fact the N++ icons were "creative commons" and where they resided, Im adding them as we speak. Ill fix the clear button and the toolbar aswell.
@clyfe: Yes I was thinking about it but I wanted a moire solid product and feedback before posting a half complete project and above that see how far I could get w/o help but the Internet ;). It'll be uploaded sometime soon. If Jens would allow I'd like to see it with the other plugins, but else I'll make it a new project (but first fix the uglyness, Jens is totally right, I just kind of forgot about that=).
I do have one question for anyone who knows something about treeviews, currently when you expand an empty folder the little '+' icon is supposed to disappear, but it doesnt get redraw properly untill the item is reselected or the entire treeview is redraw. Anyone know how to fix this?
And a new update is here:
ill make a project soon. Toolbar added and context menu
you are fast ;). It's better than before. But some hints/suggestions at this point:
- The tab icons are smaller than normal: 12x12 pix!
- Please use for the "Show FTP Folders" my icon of Explorer (Favorites).
- Remove the annoying comment "nppcm". BTW: What does cm means?
- I think "Show FTP Messages" is only necessary if you are opened a connection, so my suggestion, remove it to icon bar of "FTP Folders" dialog.
- Remove the status of connection to title bar of "FTP Folders".
- Add the progress field to the icon bar above the list.
- Remove the dialog message "INI file is missing ... will be created".
- Use to create and load the ini file the new Notepad message NPPM_GETPLUGINSCONFIGDIR.
- On connect a profile manager will be nice. Look e.g. into Total Commander or PsPad.
Thanks for your time. You are invited to host your project on:
Sent me an e-mail to clarify further details!
Wow alot of suggestions, thanks :).
-I have no idea why the 12x12 issue is in Notepad, I think all tabs have it (my icons are 16x16, but are always rendered smaller, I think it comes from notepad, but I will look into it, you do mean the little tabs in the docking dialogs?).
-Doesnt 2 same icons confuse users? I'd be happy to change it if its better, I'm just not sure if thats a good idea. I picked the chain it indicate its "linked" to something external.
-I have no idea where the "nppcm" comes from, where and when do you see it? It might be some memory issue, as I cant see it in the DLL anywhere if I open it with Notepad++ =).
-Very good suggestion indeed
-Possible, maybe make it so that the download percentage (and upload) shows there aswell like with the FunctionList?
-Never heard about it, I'll see if I can get it to work
-I suppose you mean that you can choose from a list of servers? In that case I think the FileZilla approach works very good, with a dropdownlist of predefined servers. I'll see what I can do.
That email will be send shortly, thank you.
Quick search later on nppcm: nppcm is the DLL used for the contextmenu in windows ofr the "Edit with notepad++" message. Maybe its windows?
Answome plugin: I've always been obliged to use other editors instead of NP++ when editing remote files, and I often do: I have to places of work, and all files are on a computer at one location, so when working in the second, I need to work by remote! Now I can from NP++, thank you ;)
I am very impatient to see this plugin to automatically upload the file when saving: would make it completely transparent!
One question: when you download file, it shows in NP++. Where does it put it? For example, if I DL it, then disconnect, modify it, save it... and close NP++? The modified and saved file will remain available? Not too much risk to see it overwriten?
I notice that it doesn't work yet to upload on save, right?
NPPM_SAVECURRENTFILE is what you need.
BTW, is sftp is available?
Feel free to contact me to :
don . h @ free . fr
if you have any question or need support.
being currently on vacation development is at a halt, but thatll change withing 2 weeks hopefully, its the first time in 3 weeks I have Internet.
Auto-upload is not yet available, neither is SFTP (I doiubt SFTP will be anytimne soon, I believe its an entire different protocol if I may believe wikipedia).
A new test-release for the plugin, v. 0.9.0.0 (although idk if the version numbering is applicable)
More stable (I hope),
loads of bugs fixed,
as good as all requests added.
I feel its pretty usable atm
About that cache: if you download a file to it, its just a file on you computer, the only time something happens is if you download it again (or upload to the server). It resides in notepad++/plugins/FTP_synchronize (depending on DLL name)
I really have to put it on SourceForge some time ;)
The plugin is now opensourced, GNU if I did it correctly.
It can be found on the npp-plugins CVS on sourceforge:
a prebuild DLL is on there aswell in the /build/ directory, it should be the very latest (although as of yet I havent made any changes)
Great! I can finally publish your FTP_sychronize on Notepad++'s download section.
Just one thing remains :
Could you provide your zipped binary here :
so that I can link to FTP_sychronize binary download page?
Done, you should be able to download the package(s)