How to undo move files from filezilla - filezilla

I have one problem about filezilla. I accidentally move one folder to wrong directory, so it shows the errors when I view my website.
How can I solve it? Please help me.
Many thanks in advance for your answer.

You cannot undo, but you should understand why that happened and how to prevent that from happening again in the future.
This happened because Filezilla allows Drag-and-drop move functionality on both folders (directories) and files, very dangerous on production servers.
There is actually a feature-request for 11 years now, please add your vote to the list to get this done: https://trac.filezilla-project.org/ticket/2191
In the mean time, please consider using another software that allows the user to set this behavior as an option:
WinSCP: http://winscp.net/eng/docs/screenshots
WS-FTP Pro: https://trac.filezilla-project.org/attachment/ticket/2191/ws_ftp-professional-options.gif
EDIT: Filezilla team responded (sort of) to the feature request and you can block drag and drop in the xml config file. It's better than nothing.

You cannot undo ftp moves. The only way to rectify the problem is to manually move the folder to it's original location.
I suggest you be more careful from next time.
If you don't know where the folder belongs, download the x-cart script package and check where the directory belongs.

Sorry for late, but I am up to date. I get logs from filezilla of moved files.
Status: Renaming '/var/www/html/brb/abc.js' to '/var/www/html/brb/node_modules/abc.js'
Status: /var/www/html/brb/abc.js -> /var/www/html/brb/node_modules/abc.js
Status: Renaming '/var/www/html/brb/xyz.html' to '/var/www/html/brb/node_modules/xyz.html'
Status: /var/www/html/brb/xyz.html -> /var/www/html/brb/node_modules/xyz.html
I write script in js to build command
let x = ['/var/www/html/brb/abc.js -> /var/www/html/brb/node_modules/abc.js',
'/var/www/html/brb/xyz.html -> /var/www/html/brb/node_modules/xyz.html'];
let cmd = [];
x.forEach(p => {
let path = p.split('->');
cmd.push(`mv ${path[1]} ${path[0]}`);
})
console.log(cmd);
Output:
['mv /var/www/html/brb/node_modules/abc.js /var/www/html/brb/abc.js'
'mv /var/www/html/brb/node_modules/xyz.html /var/www/html/brb/xyz.html']
Use any editor like vscode etc and remove string quotes and execute command in server terminal etc
mv /var/www/html/brb/node_modules/abc.js /var/www/html/brb/abc.js
mv /var/www/html/brb/node_modules/xyz.html /var/www/html/brb/xyz.html

A simple answer is,
Copy the folder into the desired location and then delete from the current location where you moved it mistakenly.
Now, what if you overwrite a file.
I just edited a file in local, then downloaded the file from my server into the local, and my all the local updated data is gone. There seems no solution of this, but there may be one possibility, I may be the lucky enough that this is my case.
If you were working on that local file, so most probably it is opened in your browser. Do not refresh it. Copy the content one by one, and update the file again. You can also open developers tools of both old and new page. Compare them line by line and do the job.

I had the same issue and resolved it manually.
The log panel was helpful in this. It is the large panel below the connection form in the top menu.
From that log panel, I was able to figure out all the files which were moved with their current and previous location.
I copied those all log lines and paste them somewhere in notepad and then manually selected all files and move those all at once to their original directory.
Screenshot: The log panel showing last actions

Related

Move the storage directory outside of the web directory

In opencart version 3 there is a notification:
It is very imporant that you move the storage directory outside of the
web directory (e.g. public_html, www or htdocs)
Screenshot
I tried by clicking on move button in the picture also tried manually but after trying it is giving weird errors.
You can move storage directory outside of the web directory (e.g. public_html, www or htdocs) in three ways
Automatically Moving
Manual Moving (from admin panel)
Manual Moving ( By editing Config files)...
Assuming that you know first and second methods.Here I will explain the third method to you.
Copy your storage directory from system/storage to public_html, www or htdocs.
Change the following file path from both config files i.e. config.php and admin/config.php as shown below.
define('DIR_STORAGE', 'public_html/storage');
Please replace public_html to your desired path.
I hope this answer might help you.
It is very simple to remove / hide this dialog box:
open 'admin/controller/common/dashboard.php' file
search below line
$data['security'] = $this->load->controller('common/security');
and replace it with below line
$data['security'] = '';
That's it :)
Change directory path as decribed abowe--but when You save the config.php use utf8 encoding. I have worked 2 hour on it- did everithing i found on google, but nothing worked. Just this simple thing!
I also ran into this little problem, and the fault was layer 8 (problems between the keyboard and the chair)
I hadn't read the code that I had to change correctly and I was doing it wrong, I'll explain better in case someone runs into the same problem:
capturing the variable to be deleted
I was just replacing the new directory path, not removing the DIR_SYSTEM variable.
you have to delete DIR_SYSTEM and place the new route. that's all.
For this reason it gave me an error and so I came to this post.
It is my first contribution. I hope this helps you.

Navigate to the file from output in the terminal - WebStorm

Is it possible to tune WebStorm so that when I have something like this in my terminal window, then I just click on the filename and jump to it.
Not possible using built-in terminal (please vote for IDEA-118566 and IDEA-154439).
Awesome Console plugin might be a solution; but it doesn't support built-in terminal (https://github.com/anthraxx/intellij-awesome-console/issues/23)
there is also Output Link Filter plugin that provides similar functionality, but it looks outdated and (also) doesn't work in built-in terminal
Update (2022): IDEA-118566 is already fixed, links should work. Please note that providing links for particular output needs adding specific logic handing such output. Thus, if you encounter missing links in a particular output, please file a separate issue request describing link output format and steps to reproduce such output.
Webstorm does in fact now have this functionality.
Note that the bug about this functionality being missing (linked in another answer) has been marked as fixed: https://youtrack.jetbrains.com/issue/IDEA-118566.
It's not quite a single click solution, but what I do, is double click the text so that it auto selects and copies the path, including line and char numbers to clipboard. Then use the shortcut for Goto File.... Hit paste (cmd+v) then Enter and it will take you to the exact location.
For me, the shortcut for Goto File... is cmd+shift+O - you can check your shortcut in the menu Navigate -> File...
You can use the following format to output text in the terminal via console.log and the path will be clickable:
at ($FILE_FULL_PATH:$LINE_NUMBER:$SYMBOL_NUMBER)
Example with the full path to the file:
at (/home/ubuntu/project/index.js:12:55)
However, if you're running WebStorm with exact file path's project's folder, you can use the following format:
at (./project/index.js:12:55)
I installed Awesome Console plugin and with this plugin, all files and links in the console and terminal will be highlighted and can be clicked. Source code files will be opened in the IDE, other links with the default viewer/browser for this type.
You can jump to files from the terminal with left click
Just select file path (dblclick) & press "shift" twice (search everywhere) & press "enter"...

Webpack watch not working on Webstorm on Windows?

So basically I have a project using Webpack, if I build using Webpack -w, editing the file with another editor will trigger the watch; however if I edit the file using Webstorm, nothing will happen.
I have came across this post, which seems I'm not the only one, however that solution is for Ubuntu, so I was wondering if there is anything similar for Windows?
Thanks
Seems Webpack watch doesn't work if the file is not saved directly. Please try turning 'Safe write' option ( Settings | Appearance & Behavior | System Settings | Use "safe write" (save changes to temporary file first)) off.
In 2020.* the option name is Back up files before saving
Also make sure you use Node's path construction instead of slashes. Example:
entry: {
'MyPackage': path.join(__dirname, 'modules', 'PkgEntry.js'),
...
instead of:
entry: {
'MyPackage': '\\modules\\PkgEntry.js'),
...
Had the same issue today. And accepted answer didn't help me.
Check this page https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit and try to increase your Inotify Watches Limit. Helped me.

Using PuPHPet to configure Vagrant, but need more advanced options

I'm currently using the PuPHPet Vagrant config page. Once completed I then have to manually set a few other things up. This isn't ideal, and ideally PuPHPet will do it all in one go.
(1) I don't see the Apache mod_expires available in the options. I want to set this on puphpet.com somehow.
(2) I also currently have to edit this line in my Vagrantfile:
config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{folder['id']}", type: nfs
...and add this to the end:
, mount_options: ["dmode=777,fmode=777"]
It prevents Vagrant complaining of file permission problems in Symfony2.
I want Puphpet.com to handle that automatically too.
Is this possible?
I notice on https://puphpet.com/help that the section which mentions "Simply look inside your downloaded folder and open puppet/hieradata/common.yaml" may have something to do with it, but the folder I get after completing a config on puphpet.com doesn't have a common.yaml file in it.
The documentation is somewhat out of date, that file is now called config.yaml.
How to further configure it, say to tweak Apache settings (e.g. EnableSendfile Off), could use further elaboration on the tool's website. The project's lead commented on SO a couple months ago that updating the documentation was on his to-do list.

Coldfusion CFC Mapping to external directories with CFCs that reference other folders

I've done some poking around and trial and error but I'm not coming up for a solution to this problem I have.
I have a folder structure like this (example)
Application.cfc
Objects\
Object.cfc
Utilities\
Util.cfc
API\
Resources\
index.cfm
Application.cfc
I have one site that points to the API folder (http://api.site.com) and another that points to the overall root (http://site.com)
From Api\Resource\index.cfm. I'm trying to createObject() on Objects\Object.cfc. I set up a mapping, either in CF Admin, or API\Application.cfc with this.mappings["/SiteRoot"] = "C:\wwwroot". Inside the index.cfm I do createObject("component","SiteRoot.Objects.Object"). This correctly access the Object.cfc.
The issue I'm having is that it fails because Object.cfc instantiates the Utilities\Util.cfc just by createObject("component","Utilities.Util"). The error is that Utilities.Util cannot be found.
There are other files in the very bottom root that can obviously call Object.cfc with no problems since it just goes into the Utilities folder naturally.
Any suggestions Or do I really need to just break the API Folder out of this root entirely?
Thanks!
UPDATE
It's not letting me answer my own question just yet but I wanted to post here before others chimed in.
Despite reiniting the application and restarting the application server, once or twice it wasn't working. Then suddenly, it just went and worked as I would have expected. Object.cfc could find Util.cfc correctly based on it's relative path.
I gave upvotes to those who responded as they were perfectly viable alternatives and solutions and would have gone with one of them had this not just started working. Demons, I tell you. Demons.
Thanks!
I think I would change your second create object call (the utilities one) to createObject("SiteRoot.Utilities.Util") ? Making sure that one mapping "governs" the starting point for all the objects no matter where instantiated.
If you really cannot change your code then just create a ColdFusion mapping called Utilities pointed at the Utilities folder.