windows 如何自动FTP我正在编辑的文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11803482/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to automatically FTP files that I am editing
提问by user1549397
I'm trying to figure out how to autoftp with Filezilla. Are there any other programs that do this right off the bat?
我想弄清楚如何使用 Filezilla 进行 autoftp。有没有其他程序可以立即执行此操作?
采纳答案by SomeKittens
回答by Pwnball
I use WinSCPfor some of its amazing benefits. I connect to my FTP server with WinSCP and let it monitor my local folder /website/public_html
.
我使用WinSCP来获得一些惊人的好处。我使用 WinSCP 连接到我的 FTP 服务器并让它监视我的本地文件夹/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
我在本地文件夹中所做的任何更改都会通过 WinSCP 自动上传到我的 FTP 服务器。该功能称为保持远程目录最新: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.
至于 SCSS,我也使用它:
我有一个脚本可以打开一个控制台窗口来查看我的/website/scss
文件并将它们编译为/website/public_html/styles/
. WinSCP 看到 CSS 文件已更改(或为新文件)并自动上传。
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.
注意:唯一的缺点是你无法访问你的,error_log
因为它是由 PHP 在服务器上自动生成的。为此,您可以轻松实例化另一个 WinSCP 以连接到您的网站。现在您有 1 个 WinSCP 监控您的本地文件夹和 1 个 WinSCP,您可以在其中访问您的站点地图。
回答by JacobRossDev
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.
Notepad++ 对于这个特定的功能当然是很棒的,它甚至保存了从远程服务器访问和修改的任何内容的缓存。
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').
然而(对我而言)缺点是 Notepad++ 不会自动上传预处理的 CSS 文件,如 .scss 或 .less。我尝试在 Notepad++ 中实际打开生成的 .css 文件来模拟编辑它们的行为,但这仍然在过程中增加了一个额外的步骤。我必须单击选项卡并手动保存它们(在“您的文件已更改提示”之后)。
Currently, after I make changes, I click over to FZ and upload the files manually.
目前,在我进行更改后,我单击 FZ 并手动上传文件。
回答by csandreas1
There is an easier way to do that with NetBeans IDE, there is an option to upload files with FTPor SFTPon save, manually or on Run
使用NetBeans IDE有一种更简单的方法,可以选择在保存、手动或运行时使用FTP或SFTP上传文件
- 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 linkeg www.example.com
- Upload files: Choose On Save
- Remote Connection> Manage > Add > Connection name (put one) > FTP
- 右键单击您的项目,然后单击属性
- 点击第二类运行配置
- 运行方式:选择远程网站(FTP、SFTP)
- 项目网址:放置您的网站链接,例如 www.example.com
- 上传文件:选择保存
- 远程连接> 管理 > 添加 > 连接名称(输入一个)> 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
现在添加您的 ftp 详细信息。确保您的初始目录路径正确,(您的网站路径)这样您就不会意外替换文件管理器中其他网站的任何文件
回答by Pedru
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.
此回复迟到了,但希望它对那些希望在每次保存本地编辑的文件时跳过 Filezilla 的“是否要覆盖”提示的人有所帮助。不幸的是,Filezilla 开发人员坚决反对将此行为设为可选。对于许多人来说,这是一个问题,尤其是在桌面空间有限的情况下,因为每次出现提示时,必须公开隐藏的 filezilla 窗口才能单击确定。
Anyway, the answer is WinSCP. It is also free and is so similar to filezilla that I needed no learning to use it immediately.
无论如何,答案是WinSCP。它也是免费的,与 filezilla 非常相似,我不需要立即学习使用它。
Cheers!
干杯!
回答by Matthew Lock
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.
我喜欢使用WebDrive(40 美元),它将远程服务器 (S)FTP/SSH/Cloud 安装到本地驱动器(例如 X: 在 Windows 上)。然后,您可以对驱动器 X 执行所有操作:就好像它是本地驱动器一样,WebDrive 会自动将更改上传到远程服务器。
回答by JK-Hu
Unfortunately there no option on firezilla can auto agree upload when file has been changed.
不幸的是,firezilla 上没有选项可以在文件更改时自动同意上传。
Mobaxtern can do that. You can choose "always upload" when file has been changed.
Mobaxtern 可以做到这一点。当文件被更改时,您可以选择“始终上传”。
You can edit the file with any editor, whenever you save, it will upload.
您可以使用任何编辑器编辑文件,无论何时保存,它都会上传。
回答by Pastor Burt
FileZilla does not support scheduling at any level. It is a stand-alone utility. What you should get is another freeware FTP client, AutoFTP (http://www.autoshutdownpro.com/EN/AutoFTP.aspx). AutoFTP is designed for scheduling. With AutoFTP you will be able to solve your scheduling requirements in a minute.
FileZilla 不支持任何级别的调度。它是一个独立的实用程序。您应该得到另一个免费软件 FTP 客户端 AutoFTP ( http://www.autoshutdownpro.com/EN/AutoFTP.aspx)。AutoFTP 是为调度而设计的。使用 AutoFTP,您将能够在一分钟内解决您的日程安排要求。