Unable to open output file: the file exists

Discussion related to AES Crypt, the file encryption software for Windows, Linux, Mac, and Java.
Post Reply
mtilve
Posts: 2
Joined: Sun Mar 08, 2015 5:25 am

Unable to open output file: the file exists

Post by mtilve » Sun Mar 08, 2015 5:33 am

Dear Paul,
Using AES Crypt for the first time. Downloaded and installed the correct 32-bit version. All fine so far.
Created a sample txt file in Notepad called aestest.txt.
Right-clicked and used the AES Encrypt option, it saved the file with aestest.txt with File Type as "AES Crypt Encrypted Data File". Now, on double-clicking the encrypted file and entering the correct password, keep getting the error "Unable to open the output file aestext.txt. The file exists". Am I missing any step?

User avatar
paulej
Posts: 521
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: Unable to open output file: the file exists

Post by paulej » Sun Mar 08, 2015 7:10 am

What's happening is AES Crypt creates a new .aes file from your .txt file. However, it doesn't delete you original file. When you try to decrypt, it sees your original file and presents this error to avoid accidentally writing over the file. Just rename either the original or created .aes file. Or delete the original file.

Note the above applies to Windows. On Linux and Mac, the original file will get overwritten. One of these days, we'll make those consistent.

mtilve
Posts: 2
Joined: Sun Mar 08, 2015 5:25 am

Re: Unable to open output file: the file exists

Post by mtilve » Sun Mar 08, 2015 7:24 am

Thanks, it is working fine now...great utility, Paul!

Bebbub
Posts: 1
Joined: Wed Apr 08, 2015 4:57 am

Re: Unable to open output file: the file exists

Post by Bebbub » Wed Apr 08, 2015 5:12 am

Hi! First of all, congratulations for this excellent piece of software! I was looking for an encryption software for a wile now, and I'm more than happy to find AES Crypt solving all my needs. I've also been wondering about this "the file exists" issue, because I've imagined this software working a bit different. I've thought that the encrypted file is actually overwritten physically, byte by byte, over the original file, thus destroying the original file, making impossible to retrieve it using undelete tools. This way, when decrypting the file, the original file isn't there anymore, so this message will not appear. So this is my suggestion: file overwriting. This way you can have one and only file at a time: either encrypted, either decrypted. Thanks!

User avatar
paulej
Posts: 521
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: Unable to open output file: the file exists

Post by paulej » Wed Apr 08, 2015 12:46 pm

Some would certainly like that behavior, but some don't. That would include me. What I use the software for most is sending encrypted files somewhere (like a flash drive, e-mail, or cloud storage) and I want the original left alone.

There is also a practical issue. Some static device storage systems, including some flash drives and SSDs, will not simply write over an original file. Rather, they'll give the appearance of doing that, but the data is actually written to a new physical location. I think it would be unfortunate to give some illusion of securely erasing files.

JMF
Posts: 1
Joined: Fri May 05, 2017 3:05 pm

Re: Unable to open output file: the file exists

Post by JMF » Fri May 05, 2017 3:13 pm

Hi Paul. Sorry to re-open an oldish thread, but I was wondering if there was not some way to temporarily open an encrypted file using a temporary file name to avoid the issue of having to either rename the original file / have it in another location. AESCrypt seems to work well (thanks!), but the "file already exists" thing is problematic when trying to just open and view a file in an Outlook email attachment (same error as when one tries to open the encrypted copy of a file from within the same explorer folder as the original copy). Thanks for useful utility!

User avatar
paulej
Posts: 521
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: Unable to open output file: the file exists

Post by paulej » Sat May 06, 2017 5:08 pm

No, AES Crypt doesn't deal with temp files. In fact, opening attachments in Outlook is risky since the decrypted files might be stored in a temp folder somewhere. It's best to drag them to the desktop so you know where the decrypted file is (so you can delete it when done).

AES Crypt decrypts and then exits. In order to delete, it would have to remain running waiting for another application to open, open the file, then exit. That's messy and prone to errors. Doable, but I've seen similar functionality in ZIP utilities not work well.

Anyway, I'd suggest dragging files to the desktop, decrypt, then delete the files you don't want to keep around.

Post Reply