Forum Index \ DriveHQ Customer Support Forum \
Read/Reply : 25922/1
  • dsada
  • (1 posts)

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)


5/29/2014 12:55:36 PM

  • DriveHQSupport
  • (651 posts)
Subject: 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)

 

 


Reply
5/29/2014 1:58:01 PM

Quickly Reply

Please logon and reply, Not DriveHQ Member?


Leading Cloud Surveillance service

Leading Enterprise Cloud IT Service Since 2003