\ DriveHQ Customer Support Forum \
읽음/답글 : 32698/1
  • dsada
  • (1게시물)

So I used the

ftp.drivehq.com

on port 21 and logged with my usename and password, uploaded the files that I needed for my server but they need to be constantly overwrited, I guess that the script that I am using is actually creating a temp and then trying to rename it so there is no chance to corrup the files.

But every time it tries to rename the temp file it says that can't be renamed because it already exists.

http://i.imgur.com/Z4GrC3B.png

How do I make them be renamed?Or do I need to add a line that deletes the original before renaming?(this last one I dont know how to do so, I didnt create this script and I dont have the source code)


2014-05-29 오후 12:55:36

  • DriveHQSupport
  • (672게시물)
주제: Re:FTP server not allowing rename/overwrite

If you rename abc.txt.tmp to abc.txt, and if abc.txt already exists in this folder, then rename will fail. (otherwise it needs to overwrite/delete abc.txt first).

To solve your problem, you can edit your script file to delete abc.txt before the rename operation. It seems you are using Windows based FTP script. In this case, you just need to add one line before the rename operation:

           del filename (or filePath)

 

 


회신하다
2014-05-29 오후 1:58:01

즐겨찾기에 추가하고 공유하세요
빠른 답변

제발 로그인 그리고 답장하세요. DriveHQ 회원이 아니신가요?


Leading Cloud Surveillance service

Leading Enterprise Cloud IT Service Since 2003