+[8.50b5] Folder rename on FTP connection
Moderators: Hacker, petermad, Stefan2, white
+[8.50b5] Folder rename on FTP connection
When I rename a directory on FTP server and I upload the local directory with the same name, Total Commander says the "Target already exists [file name] do you want to overwrite it?".
ex:
1. There is a "plugins" dir on FTP
2. I rename it to "plugins-old"
3. I copy new version of "plugins" from local disk
4. [overwrite warning message here]
ex:
1. There is a "plugins" dir on FTP
2. I rename it to "plugins-old"
3. I copy new version of "plugins" from local disk
4. [overwrite warning message here]
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Not confirmed either. I guess that the server is returning an error. Therefore could you create and post a log of this operation, please? Configuration - Options - FTP - Log file.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Thanks, here is the log, I edited the domain name but the real IP is left there in case it's needed for tests.
- I am using 64bit version.
- When I use FileZilla, the problem don't occur
The FTP belongs to one of the major hosting providers in Poland - Nazwa.pl, but problem occurs also with different ones.
In case the overwrite message is not be visible in the log, I made a screenshot on URL: imgur.com/38xyVRk
- I am using 64bit version.
- When I use FileZilla, the problem don't occur
The FTP belongs to one of the major hosting providers in Poland - Nazwa.pl, but problem occurs also with different ones.
In case the overwrite message is not be visible in the log, I made a screenshot on URL: imgur.com/38xyVRk
Code: Select all
Connect to: (2013-10-17 09:28:06)
hostname=[SERVER-URL]
username=mywebsiteserverhere
startdir=/
[SERVER-URL]=77.55.78.101
220 FTP server ready
USER mywebsiteserverhere
331 Password required for mywebsiteserverhere
PASS ****************
230 User mywebsiteserverhere logged in
SYST
215 UNIX Type: L8
FEAT
211-Features:
MDTM
MFMT
TVFS
MFF modify;UNIX.group;UNIX.mode;
MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
REST STREAM
SIZE
211 End
OPTS UTF8 ON
500 OPTS UTF8 not understood
Connect ok!
CWD /
250 CWD command successful
PWD
257 "/" is the current directory
Get directory
TYPE A
200 Type set to A
PORT 192,168,0,138,213,226
200 PORT command successful
MLSD
150 Opening ASCII mode data connection for MLSD
Download
Waiting for server...
226 Transfer complete
CWD rss
250 CWD command successful
PWD
257 "/rss" is the current directory
Get directory
PORT 192,168,0,138,213,237
200 PORT command successful
MLSD
150 Opening ASCII mode data connection for MLSD
Download
Waiting for server...
226 Transfer complete
TYPE I
200 Type set to I
PORT 192,168,0,138,213,238
200 PORT command successful
RETR trendy.php
150 Opening BINARY mode data connection for trendy.php (1758 bytes)
Download
Waiting for server...
226 Transfer complete
Copied (2013-10-17 09:28:17): ftp://[SERVER-URL]/rss/trendy.php -> C:\rss\trendy.php 1 758 bytes, 1 kbytes/s
PORT 192,168,0,138,213,241
200 PORT command successful
RETR nowosci.php
150 Opening BINARY mode data connection for nowosci.php (1765 bytes)
Download
Waiting for server...
226 Transfer complete
Copied (2013-10-17 09:28:17): ftp://[SERVER-URL]/rss/nowosci.php -> C:\rss\nowosci.php 1 765 bytes, 114 kbytes/s
PORT 192,168,0,138,213,242
200 PORT command successful
RETR informacje_z_branzy.php
150 Opening BINARY mode data connection for informacje_z_branzy.php (1347 bytes)
Download
Waiting for server...
226 Transfer complete
Copied (2013-10-17 09:28:17): ftp://[SERVER-URL]/rss/informacje_z_branzy.php -> C:\rss\informacje_z_branzy.php 1 347 bytes, 86 kbytes/s
CWD /
250 CWD command successful
PWD
257 "/" is the current directory
RNFR rss
350 File or directory exists, ready for destination name
RNTO rss-old
250 Rename successful
Get directory
TYPE A
200 Type set to A
PORT 192,168,0,138,213,252
200 PORT command successful
MLSD
150 Opening ASCII mode data connection for MLSD
Download
Waiting for server...
226 Transfer complete
MKD rss
257 "/rss" - Directory successfully created
CWD rss
250 CWD command successful
PWD
257 "/rss" is the current directory
TYPE I
200 Type set to I
PORT 192,168,0,138,214,15
200 PORT command successful
STOR informacje_z_branzy.php
150 Opening BINARY mode data connection for informacje_z_branzy.php
Upload
226 Transfer complete
SIZE informacje_z_branzy.php
213 1347
Copied (2013-10-17 09:28:39): C:\rss\informacje_z_branzy.php -> ftp://[SERVER-URL]/rss/informacje_z_branzy.php 1 347 bytes, 28 kbytes/s
PORT 192,168,0,138,214,17
200 PORT command successful
STOR nowosci.php
150 Opening BINARY mode data connection for nowosci.php
Upload
226 Transfer complete
SIZE nowosci.php
213 1765
Copied (2013-10-17 09:28:40): C:\rss\nowosci.php -> ftp://[SERVER-URL]/rss/nowosci.php 1 765 bytes, 114 kbytes/s
PORT 192,168,0,138,214,19
200 PORT command successful
STOR trendy.php
150 Opening BINARY mode data connection for trendy.php
Upload
226 Transfer complete
SIZE trendy.php
213 1758
Copied (2013-10-17 09:28:41): C:\rss\trendy.php -> ftp://[SERVER-URL]/rss/trendy.php 1 758 bytes, 54 kbytes/s
CWD /
250 CWD command successful
PWD
257 "/" is the current directory
Get directory
TYPE A
200 Type set to A
PORT 192,168,0,138,214,20
200 PORT command successful
MLSD
150 Opening ASCII mode data connection for MLSD
Download
Waiting for server...
226 Transfer complete
QUIT
221 Goodbye.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I cannot see any errors - according to the log, directory rss is successfully renamed to rss-old, a new rss is created, and files informacje_z_branzy.php, nowosci.php and trendy.php.
When exactly do you get this error?
When exactly do you get this error?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Maybe the log don't register overwrite dialog popups?
It happens after I rename remote dir (there should be some files inside) and I use F5 [Enter] on the dir in local disk pane. Then, before the copy starts, I get the message saying the target file already exists.
It feels like some cache of FTP contents is not refreshed after rename and TC assumes the contents are still there.
It happens after I rename remote dir (there should be some files inside) and I use F5 [Enter] on the dir in local disk pane. Then, before the copy starts, I get the message saying the target file already exists.
It feels like some cache of FTP contents is not refreshed after rename and TC assumes the contents are still there.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
No, the cache is updated/cleared. But you can check easily whether it's the cache or not. Open wcx_ftp.ini, then look for the section belonging to this ftp connection. There, add the line
CacheDirs=0
CacheDirs=0
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
OK, how exactly do you rename the folder? It seems that TC doesn't update the cache for some unknown reason in your case.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Strange, I'm using this too in my tests, and never get this error. 

Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I can confirm the problem. Steps to reproduce - do exactly as described!:
1) connect to FTP,
2) create local directory "C:\123" with a file "test.bin" inside (by using only digits in "123" we are case-insensitive),
3) simply copy this directory (with its contents) to remote FTP server,
4) go into "123" on remote FTP server, so contents of this directory will be cached by TC,
5) go back to the root directory of the remote FTP server,
6) rename remote directory "123" to "1234",
7) now copy local directory "C:\123" to the remote FTP server - warning will appear, it will say that "test.bin" already exists.
So cache of TC seems to be out-of-sync with the remote FTP contents after directory renaming.
1) connect to FTP,
2) create local directory "C:\123" with a file "test.bin" inside (by using only digits in "123" we are case-insensitive),
3) simply copy this directory (with its contents) to remote FTP server,
4) go into "123" on remote FTP server, so contents of this directory will be cached by TC,
5) go back to the root directory of the remote FTP server,
6) rename remote directory "123" to "1234",
7) now copy local directory "C:\123" to the remote FTP server - warning will appear, it will say that "test.bin" already exists.
So cache of TC seems to be out-of-sync with the remote FTP contents after directory renaming.
I can confirm this issue using Marcin's steps. But: only if transfer (FTP upload) is made in foreground. It doesn't happen if the files are uploaded in background.
This affects at least TC versions 8.01 and 8.5 Beta 6 (both 32 bit); don't know about TC 64 bit.
Regards
Dalai
This affects at least TC versions 8.01 and 8.5 Beta 6 (both 32 bit); don't know about TC 64 bit.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror