How to automatically FTP files that I am editing - windows

I'm trying to figure out how to autoftp with Filezilla. Are there any other programs that do this right off the bat?

I use WinSCP for some of its amazing benefits. I connect to my FTP server with WinSCP and let it monitor my local folder /website/public_html.
Any changes I make in my local folder automatically get uploaded to my FTP server by WinSCP. The feature is called Keep remote directory up to date:
http://winscp.net/eng/docs/task_keep_up_to_date
As for SCSS, I also use it:
I have a script that opens a console window to watch my /website/scss files and compiles them to /website/public_html/styles/. WinSCP sees the CSS file has changed (or is new) and automatically uploads it.
Notice: The only downside is you cannot reach your error_log as that is automatically generated on the server by PHP. To do this you can easily instantiate another WinSCP to connect to your website. Now you have 1 WinSCP monitoring your local folder and 1 WinSCP where you can access your site map.

If by "autoftp" you mean "update the file on the server whenever I save it" and you're working with code, then I'd recommend the wonderful Notepad++

Notepad++ certainly is wonderful for this particular function and it even saves a cache of the whatever has been accessed and modified from the remote server.
The downside however (for me) is that Notepad++ will not auto-upload preprocessed CSS files like .scss or .less. I tried actually opening the resulting .css files in Notepad++ to mimic the act of editing them, but that still puts an extra step in the process. I have to click over to the tabs and manually save them (after the 'your file as changed prompt').
Currently, after I make changes, I click over to FZ and upload the files manually.

This response is late, but hopefully it will be helpful to those looking to get past Filezilla's "do you want to overwrite" prompt every time a file being edited locally is saved. Unfortunately, the Filezilla developers are staunchly opposed to making this behavior optional. It is a problem for many, especially when working with limited desktop space, since every time the prompt appears, one must expose the hidden filezilla window just to click okay.
Anyway, the answer is WinSCP. It is also free and is so similar to filezilla that I needed no learning to use it immediately.
Cheers!

There is an easier way to do that with NetBeans IDE, there is an option to upload files with FTP or SFTP on save, manually or on Run
Right click on your project and click Properties
Click the second category run configuration
Run As: Choose Remote Website (FTP,SFTP)
Project Url: put your website live link eg www.example.com
Upload files: Choose On Save
Remote Connection > Manage > Add > Connection name (put one) > FTP
Now add your ftp details. Make sure your Initial directory path is correct, (your website path) so you will not accidentally replace any files from other website in the file manager

Unfortunately there no option on filezilla can auto agree upload when file has been changed.
Mobaxtern can do that. You can choose "always upload" when file has been changed.
You can edit the file with any editor, whenever you save, it will upload.

I like to use WebDrive ($40) which mounts a remote server (S)FTP/SSH/Cloud to a local drive (eg. X: on Windows). You can then just do everything to drive X: as if it's a local drive and WebDrive automatically uploads the changes to the remote server.

Related

Intellij IDEA 13.1 How to edit/create files and folders in remote machine on the fly

1 version,. and am trying to do the following..
In short - Access remote machine and browse and EDIT on the fly i.e without creating a local copy. i.e i need to create a ftp connection and start editing the files, create folders etc on the fly
Access the Remote machine - which is working perfectly i.e am able to connect to remote machine
Now i need to browse the files and folders from the remote machine which is also working correctly [see IMAGE]
I need to do the following now .. just open the file ftpfile.tryit (having full permission) from remote machine on the main window and edit it DIRECTLY .. which am not able to perform, all am seeing is the following behavior
When i double-click there is no change/ nothing happens
When i rightclick, i need to copy the file to local machine (in my case it is mac) and then edit it.. which i do not want to do..
Under remote host configuration you can also see mapping tab, where you can to configure mapping between remote and local files. After you finish it, you can double click on file on remote machine and it must open local version, after you finish editing local version you can right-click on main editor window and choose option 'Sync with deployed to...'.
I hope it will help you.

Opening a CHM file produces: "navigation to the webpage was canceled"

I am trying to open a .chm file.
I downloaded the source, extracted it, and double clicked on Waffle.chm and clicked "Open" but no matter what element in the chm file I click, I get the message:
Navigation to the webpage was canceled.
What you can try:
Retype the address.
What's going on here?
Summary
Microsoft Security Updates 896358 & 840315 block display of CHM file contents when opened from a network drive (or a UNC path). This is Windows' attempt to stop attack vectors for viruses/malware from infecting your computer and has blocked out the .chm file that draw data over the "InfoTech" protocol, which this chm file uses.
Microsoft's summary of the problem: http://support.microsoft.com/kb/896054
Solutions
If you are using Windows Server 2008, Windows 7, windows has created a quick fix. Right click the chm file, and you will get the "yourfile.chm Properties" dialog box, at the bottom, a button called "Unblock" appears. Click Unblock and press OK, and try to open the chm file again, it works correctly. This option is not available for earlier versions of Windows before WindowsXP (SP3).
Solve the problem by moving your chm file OFF the network drive. You may be unaware you are using a network drive, double check now: Right click your .chm file, click properties and look at the "location" field. If it starts with two backslashes like this: \\epicserver\blah\, then you are using a networked drive. So to fix it, Copy the chm file, and paste it into a local drive, like C:\ or E:. Then try to reopen the chm file, windows does not freak out.
Last resort, if you can't copy/move the file off the networked drive. If you must open it where it sits, and you are using a lesser version of windows like XP, Vista, ME or other, you will have to manually tell Windows not to freak out over this .chm file. HHReg (HTML Help Registration Utility) Utility Automates this Task. Basically you download the HHReg utility, load your .chm file, press OK, and it will create the necessary registry keys to tell Windows not to block it. For more info: http://www.winhelponline.com/blog/fix-cannot-view-chm-files-network-xp-2003-vista/
Windows 8 or 10? --> Upgrade to Windows XP.
"unblocking" the file fixes the problem. Screenshot:
Win 8 x64:
just move it to another folder or rename your folder (in my case: my folder was "c#").
avoid to use symbol on folder name. name it with letter.
done.
In addition to Eric Leschinski's answer, and because this is stackoverflow, a programmatical solution:
Windows uses hidden file forks to mark content as "downloaded". Truncating these unblocks the file. The name of the stream used for CHM's is "Zone.Identifier". One can access streams by appending :streamname when opening the file. (keep backups the first time, in case your RTL messes that up!)
In Delphi it would look like this:
var f : file;
begin
writeln('unblocking ',s);
assignfile(f,'some.chm:Zone.Identifier');
rewrite(f,1);
truncate(f);
closefile(f);
end;
I'm told that on non forked filesystems (like FAT32) there are hidden files, but I haven't gotten to the bottom of that yet.
P.s. Delphi's DeleteFile() should also recognize forks.
The definitive solution is to allow the InfoTech protocol to work in the intranet zone.
Add the following value to the registry and the problem should be solved:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"MaxAllowedZone"=dword:00000001
More info here: http://support.microsoft.com/kb/896054
Go to Start
Type regsvr32 hhctrl.ocx
You should get a success message like:
" DllRegisterServer in hhctrl.ocx succeeded "
Now try to open your CHM file again.
other way is to use different third party software. This link shows more third party software to view chm files...
I tried with SumatraPDF and it work fine.
I fixed this programmatically in my software, using C++ Builder.
Before I assign the CHM help file, Application->HelpFile = HelpFileName, I check to see if it contains the "Zone.Identifier" stream, and when it does, I simply remove it.
String ZIStream(HelpFileName + ":Zone.Identifier") ;
if (FileExists(ZIStream))
{ DeleteFile(ZIStream) ; }
There are apparently different levels of authentication. Most articles I read tell you to set the MaxAllowedZone to '1' which means that local machine zone and intranet zone are allowed but '4' allows access for 'all' zones.
For more info, read this article:
https://support.microsoft.com/en-us/kb/892675
This is how my registry looks (I wasn't sure it would work with the wild cards but it seems to work for me):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"MaxAllowedZone"=dword:00000004
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"UrlAllowList"="\\\\<network_path_root>;\\\\<network_path_root>\*;\\ies-inc.local;http://www.*;http://*;https://www.*;https://*;"
As an additional note, weirdly the "UrlAllowList" key was required to make this work on another PC but not my test one. It's probably not required at all but when I added it, it fixed the problem. The user may have not closed the original file or something like that. So just a consideration. I suggest try the least and test it, then add if needed. Once you confirm, you can deploy if needed. Good Luck!
Edit: P.S. Another method that worked was mapping the path to the network locally by using mklink /d (symbolic linking in Windows 7 or newer) but mapping a network drive letter (Z: for testing) did not work. Just food for thought and I did not have to 'Unblock' any files. Also the accepted 'Solution' did not resolve the issue for me.
Moving to local folder is the quickest solution, nothing else worked for me esp because I was not admin on my system (can't edit registery etc), which is a typical case in a work environment.
Create a folder in C:\help drive, lets call it help and copy the files there and open.
Do not copy to mydocuments or anywhere else, those locations are usually on network drive in office setup and will not work.

Can Notepad++ automatically upload local files to the server when I save?

I use Notepad++ with its NppFTP plugin. I am required to keep local copies up to date, so I edit the local files then upload them to the server. I'm wondering if there is a way for Notepad++ to automatically upload the file to the server as soon as I save it, without me having to press another button.
I'm open to using other FTP programs but I would rather stick with Notepad++ as the text editor
I know this question is slightly dated, but I would just like to put out there to alleviate future confusion for anyone who tries to find an answer to this question that as far as I know, NppFTP currently does this by default. There is a window beneath the main file view area that informs you of current FTP operations. Dreamweaver has started crapping out on me regularly so I had to find an equally powerful solution; it seems like Notepad++ just might be that!
Instead of trying to do this solely with Notepad++, I've gotten a similar workflow using Filezilla as well.
I set Notepad++ as my default text editor (Edit -> Settings -> File Editing -> Use Custom Editor) in Filezilla.
I can right-click on a local file (in Filezilla) and press "edit". Whenever I save the file in Notepad++, Filezilla detects the difference and prompts me to upload the file.
Will reply back to this post once I can get this process to be completely automatic.
Researching about same problem , i found from the Notepad++ Plugin Manager NppNetNote plugin. It allow you to edit both files at time (Local and remote) wich is like edit local and publish.
Edit: I'm sorry. Mistake. Now that plugin is called NppDocShare, and acts as server/client for a live document. You can edit a file from two locations (Notepad++ executions) at twice, but cannot edit two files nor emulates the autoupload.
I'd try the #Gabriel Ryan Nahmias and he's just RIGHT. The NppFTP plugin does that you wanna, but is a little tricky (obvious when you do) to configure.
By default, the program uses a variable path (Global cache: %CONFIGDIR%\Cache\%USERNAME%#%HOSTNAME%) to store the local copy that is uploaded at save. You need to create a pair folder when create a ftp CONNECTION PROFILE to say to NppFTP plugin how you wanna threat the file/connection. Otherwise, the ftp file goes to global.
Once the profile is created, i.e; C:\myfolder\ vs / (/ is relative to ftp) any file Edited or Created will be created/autouploaded to FTP at save. Also, you can open the FTP file, and it will be threated as the local one. Untill you save that, the real local file is not overwritten. If you dont like the file from FTP, simply close file and open from the local folder. So, you can chose which document wanna edit at start :)
Works Like Magic. Now im in love with Notepad++ :)
Extra: The subfolder creation is not magic. This only works from FTP to Local. You can edit a file from FTP subfolder and the folder plus file will be reproduced into local. No way to create from Local to FTP. You must create the ftp subfolder by hand :X (Unexpected)
You can manage files by two ways. Creating a profile per folder/proyect or create multiple local cache directories to a single profile. BUT, only the first one will be available (You will reorder it on each use). No magic here :( and it's more easy to create profiles and choose from the droplist at connect.
Anyway, i think the NppFTP is doing the things very well.
I had the same problem. Solved updating the NppFTP plugin to the latest stable version.
Cheers!

How to easily compare local and remote files via SFTP

I would like to compare local and remote files via sftp or other method, dreamweaver has the option of doing this in your favorite merge editor (i like winmerge), but I am not using dw at this juncture. Are there any other decent (windows7) programs out there that do synchronize and compare nicely?
Beyond Compare does (using our SFTP components BTW), but the way is not quite obvious -- you need to enter the URL in the form of "sftp://username#host.tld/path/to/directory/" as a directory to compare. I have yet to find how to store this string in some reusable way in Beyond Compare.
Upd: Forgot to mention that Beyond Compare handles regular FTP and FTP-over-TLS as well.
We use Beyond Compare here too. In DreamWeaver you can identify a compare program to use during synchronization - click CTRL-U to open the Preferences dialog box; the option you want is about half way down: "File Compare". There you enter the *.exe program location for the compare application you wish to interact with DreamWeaver. If you DreamWeaver is connected to a remote server click on the root folder or a folder you wish to compare, right click and choose 'Synchronize'. Dreamweaver will use it's FTP settings to find differences in files, if you choose compare the FTP (or SFTP) facilities in DreamWeaver will download the remote file to a temporary location and will engage the Compare Software you have instructed it to in your DreamWeaver Preferences.

Customizable Windows right-click file uploader?

I'm looking for a "right-click upload" application like RightLoad - an application that can upload media files to a remote FTP server from the Windows Explorer's context menu. I want to customize the application to serve as a customized image uploading tool to a PHP-based CMS.
The user would upload images and other media files to a defined FTP account (I'm also very open for other methods of transport, as long as they are supported by run-off-the-mill web hosting stacks) that they could then use in the CMS they log in to.
For me to be able to do these customizations, the application would have to be Open Source - RightLoad is "only" Freeware. Alternatively, I'm open for closed-source and commercial suggestions as long as they allow "pre-packaged" server settings that can easily be deployed to the user.
Does anybody know such a tool compatible with at least the most current versions of Windows (XP, Vista, 7)?
Bounty
Thanks all for the great input. In the case at hand, I decided it's easiest for me to stick with RightLoad and create a workflow in which the URL presented by RightLoad after the upload is copy+pasted into the CMS. I am putting a bounty on this because I think it's a worthy question for future generations, and I want to be the first one to put up a 500 bounty under the new bounty system :)
You could just use the send to menu using window's My network Places like this http://techie-buzz.com/how-to/right-click-and-send-to-ftp.html
I think WinSCP might have everything you want:
Open Source under GNU GPL
Windows Explorer's 'Send To' Context Menu
Drag 'n Drop Shell Extension
lots of additional features
and it can be scripted and is more secure than FTP due to using SSH
If you insist on open source, why not create a custom context menu handler and send it using some open source FTP client?
I would have to check the details, if it's really viable, but I would start with it.
I just had an idea, tested and working:
use regedit to edit HKEY_CLASSES_ROOT/*/Shell
add a key in shell called FTP to Mysite, in the default value set it to FTP to Mysite.
then add a key to the FTP key you just created called command, in the command default value use:
C:\Program Files (x86)\Internet Explorer\iexplore.exe http://www.mysite.com?file=%1
what this will do is open IE and the address www.mysite.com?file=C:\path\to\file.jpg
now using $_GET you can get the file address, upload it via php to where ever, even add an interface...
now when the user right clicks on any file, they can upload it via your web site by clicking FTP
1) another software is RightLoad , i use it that this moment!
2) The nice software I used over years, was FLING. It adds Right Click menu in windows explorer... However, I have left the software, because till today (version 2.35) fling DOESNT support SFTP (And nowadays on all sites I use SFTP!!)
3) I DONT like SEND-TO menu! (because I think passwords saved in WINDOWS can be easily stolen by virus..)

Resources