Click here to Skip to main content
14,034,925 members
Click here to Skip to main content
Add your own
alternative version


52 bookmarked
Posted 3 Jun 2007

TCExplorer - Portable Software to Import, Export, Delete, Rename, View, Edit and Execute Files in TrueCrypt Containers

, 9 Oct 2007
Rate this:
Please Sign up or sign in to vote.
A portable software to import, export, delete, rename, view, edit and execute files in TrueCrypt containers without requiring administrative privileges
Screenshot - TCExplorer.gif


TrueCrypt is a free open-source disk encryption software. It is able to create a virtual encrypted disk within a file and mounts it as a real disk. The encryption is automatic, real-time (on-the-fly) and transparent. However, a major disadvantage of TrueCrypt and all other on-the-fly encryption software is the requirement of administrative privileges on the computers where they are used. Thus they will not be usable in places such as public libraries and internet cafes, where the computers are typically locked down and the users are given only limited privileges.

The purpose of this software is to overcome this limitation of TrueCrypt by providing an interface, similar to compression and decompression software, where directories and files can be imported and exported easily from TrueCrypt containers. There are some debates on the merits of such software. Those in favor argue that it will make TrueCrypt truly portable. Those against it argue that it is a security breach to extract files stored in TrueCrypt containers to computers where you do not have control. I do not wish to partake in such debates. This software arises because of my own needs. I wish to transport my documents (which are not very confidential) in my thumbdrive but I do not wish others to be able to look at my documents if I accidentally lose my thumbdrive. Thus I need to encrypt my files and a good candidate to encrypt them is TrueCrypt. However, as I may need to extract the files onto other computers (which most likely will not be logged in as administrator), I will need a software which allows me to extract TrueCrypt files without requiring administrative privileges. A search on the net shows that it is possible to create such software and a proof-of-concept commandline software, OTFExplorer has been created by Josh Harris. However, the author did not wish to continue the project to build a GUI interface. This software picks up where Josh Harris left off.

Main Features

  1. Import directories/files into TrueCrypt containers
  2. Export directories/files from TrueCrypt containers
  3. Delete directories/files stored in TrueCrypt containers
  4. Rename directories/files stored in TrueCrypt containers
  5. View text/HTML/graphic files stored in TrueCrypt containers
  6. Edit files stored in TrueCrypt containers
  7. Execute files stored in TrueCrypt containers
  8. Show total, used and free space in TrueCrypt containers
  9. Color-code files according to their extensions
  10. Rapidly access list of favorite TrueCrypt containers

Main Limitations

The following limitations primarily arise because of the limitation of OTFExplorer.

  1. Cannot handle files with Unicode names in TrueCrypt containers (though able to open TrueCrypt containers with Unicode names)
  2. Can only open TrueCrypt containers with FAT partitions
  3. Cannot handle hidden volumes (may not be a limitation of OTFExplorer)


Opening a TrueCrypt container: Either use File->Open or just drag and drop a TrueCrypt container from Windows Explorer to TCExplorer.

Importing directories/files into TrueCrypt container: Drag and drop directories/files from Windows Explorer to TCExplorer.

Exporting directories/files from TrueCrypt container: Drag and drop directories/files from TCExplorer to Windows Explorer. The directories/files will first be extracted to a predefined temporary directory, and then moved to the destination directory.

Deleting directories/files from TrueCrypt container Select directories/files in TCExplorer and press Del key.

Renaming directories/files from TrueCrypt container: Select a directory or file in TCExplorer and click on it again to activate the change name option.

Opening a TrueCrypt container from commandline: The command "TCExplorer.exe" will launch TCExplorer and load the TrueCrypt container "". TCExplorer will then prompt the user for password before continuing. This feature may be useful if you want to always automatically load a particular TrueCrypt container when you plug in your thumbdrive.

Opening a file in TrueCrypt container for editing or execution: Double click on the files to open. The files will first be extracted to a predefined temporary directory and then either opened using the associated program or if it is an executable file, it will be run. If the opened files were modified, the user will be asked whether he/she wishes to re-import the modified file into the TrueCrypt container.

Viewing a file using the internal viewerRight-click on a file and choose "View with Internal Viewer". The file will be extracted to memory and shown in an internal viewer. This feature is useful if you do not wish to write any files to disk. However, the file may still remain in memory after the internal viewer is closed.


  1. Stay on top: Make TCExplorer stay on top of other windows
  2. View file size: View size of files stored in TrueCrypt containers
  3. Save window position: Save last window position and size on closing and revert on next launch

Points of Interest

TCExplorer is built using wxWidgets. The source codes provide a good learning resource for drag and drop operations. Of particular interest is the development of customized wxIDropSource and wxDropSource classes (TCIDropSource and TCDropSource).

STDMETHODIMP TCIDropSource::QueryContinueDrag(BOOL fEscapePressed,
                                              DWORD grfKeyState)
  if ( fEscapePressed )

  // initialize ourselves with the drag begin button
  if ( m_grfInitKeyState == 0 ) {
    m_grfInitKeyState = grfKeyState & (MK_LBUTTON | MK_RBUTTON | MK_MBUTTON);

  if ( !(grfKeyState & m_grfInitKeyState) ) {
    // button which started d&d released, go!

    m_pDropSource->tcList_->Export(); 	// Export directories and files 
					// to temporary system directory.

    return DRAGDROP_S_DROP;

  return S_OK;

The above shows the modifications to the wxIDropSource class. By adding codes before the return DRAGDROP_S_DROP; statement, TCExplorer is able to delay the extraction of files to the temporary directory until the user releases the mouse button. However, I do not know how to check whether the window where the user drops the files is able to receive the files or not. So even if the window is not able to receive the files, the files will still be extracted to the temporary directory.

TCDropSource::TCDropSource(TCList *tcl,
                           const wxCursor &cursorCopy,
                           const wxCursor &cursorMove,
                           const wxCursor &cursorStop)
            : wxDropSourceBase(cursorCopy, cursorMove, cursorStop), tcList_(tcl)

TCDropSource::TCDropSource(wxDataObject& data,
                           TCList *tcl,
                           const wxCursor &cursorCopy,
                           const wxCursor &cursorMove,
                           const wxCursor &cursorStop)
            : wxDropSourceBase(cursorCopy, cursorMove, cursorStop), tcList_(tcl)

The above shows the main modification to the wxDropSource class. The two constructors are changed so that they will receive a pointer to the class which handles the export function.

A side effect of using the wxIDropSource and wxDropSource classes is that TCExplorer can only be compiled for the Windows platform, even though it is using wxWidgets.

In addition to the drag and drop operations, the source codes also provide numerous examples of directory operations in wxWidgets. The source codes are fairly well commented and the reader is invited to look at them to understand more of the inner workings of TCExplorer.

Compiling the Source Code

A Code::Blocks configuration file is provided. You will need to download and install wxWidgets before you can compile TCExplorer. For more details on the required location of the wxWidgets libraries, please refer to the Code::Blocks configuration file.

Known Bugs

  • Bug 1: The list control window in TCExplorer may not refresh correctly after renaming a directory/file. Workaround: Press F5 to refresh the list control. (If there are any wxWidgets experts who know how to solve this, please contact me.)
  • Bug 2: TCExplorer may crash when importing/exporting/deleting/renaming a file with apostrophe. I was able to duplicate the crash a few times before it disappears again.


TCExplorer is released as public domain. This means that the source code is provided without any restrictions. The licence for OTFExplorer is included in the source code package.

Future Plans

None. TCExplorer has currently met all my personal needs so I will not be adding any new features in the near future (though from my updates since version 1.1, you can see that I do add new features if I find that they are easy to add). Since the source code is public domain, you are free to modify it to suit your needs. However, I would appreciate it if you could either send me any important modifications so that I can incorporate it into TCExplorer, or release the modifications yourself so that everyone can benefit from it.


  • 29 September 2007: Version 1.6 released
    • Bugfix: Corrected bug that occurs during drag and drop TrueCrypt container file after previous opening error.
    • Enhancement: Added "Delete temp dir now" under File menu to delete the temporary directory immediately.
    • Enhancement: Added "Restore Defaults" button to Temporary Directory options.
    • Enhancement: Allow user to specify colours for displaying files based on their extensions.
    • Enhancement: Allow user to view contents of text files without extracting the files from the TrueCrypt container.
  • 17 September 2007: Version 1.5.1 released
    • Bugfix: Resolve "DDE execute request failed" error.
  • 4 September 2007: Version 1.5 released.
    • Bugfix: Corrected over-aggressive check for full TrueCrypt container on import.
    • Enhancement: Added message dialog for confirmation of overwriting existing files in container during import.
    • Enhancement: Allow user to define any directory as the temporary directory.
    • Enhancement: Added option to securely delete directories/files in temporary directory using Eraser commandline (eraserd.exe).
    • Enhancement: Added Favorites menu to allow user to maintain a list of TrueCrypt containers for easy access.
    • Enhancement: Allow TCExplorer to open a file in TrueCrypt container using the associated program and re-import the file if changes are done.
  • 11 June 2007: Version 1.4 released.
    • Enhancement: TCExplorer now has an icon!
    • Enhancement: Allow TCExplorer to open a file from the commandline. e.g. "TCExplorer.exe".
    • Enhancement: Added option to allow TCExplorer to save last window position and size on closing and revert on next launch.
    • Enhancement: Added option to allow TCExplorer to not delete directories/files in temporary directory after exporting is finished so that users can use their own file shredder software to securely delete the temporary directories/files.
    • Enhancement: Added option to securely delete directories/files in temporary directory after exporting is finished by overwriting the files with null characters and then renaming them to ~ before deleting them. Directories are also renamed to ~ before deletion.
  • 8 June 2007: Version 1.3 released
    • Bugfix: Prevent directories/files in TrueCrypt container from dragging and dropping onto the same TrueCrypt container. The previous bugfix didn't really solve the problem.
    • Bugfix: Remove error message when no renaming is done.
    • Enhancement: Added option to view size of files stored in TrueCrypt containers.
  • 7 June 2007: Version 1.2 released. Thanks to dcrochet from TrueCrypt forum for pointing out the following bugs.
    • Bugfix: Prevent files from being imported if TrueCrypt container becomes full.
    • Bugfix: Prevent directories/files in TrueCrypt container from dragging and dropping onto the same TrueCrypt container.
    • Enhancement: TCExplorer is now compressed with UPX, thanks to BuddhaChu from PortableApps for the suggestion.
  • 3 June 2007: Version 1.1 released
    • Renamed software to TCExplorer because TrueCrypt is a registered trademark and cannot be used
  • 2 June 2007: Version 1.0 released


The author does not guarantee that the software will work perfectly. Please use this software only on data that you can afford to lose. By downloading and using this software, you have implicitly agreed to be part of the guinea pig experiment to test the software for any bugs.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Yap Chun Wei
Singapore Singapore
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionCan compile in VC++6 in debug mode, but not release mode Pin
JPM200914-Nov-13 7:36
memberJPM200914-Nov-13 7:36 
Generalhelp file to compile the source Pin
sanjayasaukar2-Dec-08 23:11
membersanjayasaukar2-Dec-08 23:11 
Generalcannot find '/'. make sure the path is correct Pin
spdwslc25-Jun-08 14:47
memberspdwslc25-Jun-08 14:47 
AnswerRe: cannot find '/'. make sure the path is correct Pin
Raidiator31-Jul-08 3:34
memberRaidiator31-Jul-08 3:34 
Generalerror at first use: Not an OTF volume or incorrect password Pin
scottb8-Feb-08 12:24
memberscottb8-Feb-08 12:24 
GeneralRe: error at first use: Not an OTF volume or incorrect password Pin
Yap Chun Wei9-Feb-08 2:39
memberYap Chun Wei9-Feb-08 2:39 
GeneralRe: error at first use: Not an OTF volume or incorrect password Pin
scottb11-Feb-08 9:42
memberscottb11-Feb-08 9:42 
GeneralRe: error at first use: Not an OTF volume or incorrect password Pin
Yap Chun Wei11-Feb-08 13:36
memberYap Chun Wei11-Feb-08 13:36 
QuestionKeyfile support? Pin
Localfreak28-Dec-07 11:26
sussLocalfreak28-Dec-07 11:26 
GeneralRe: Keyfile support? Pin
Yap Chun Wei16-Jan-08 14:12
memberYap Chun Wei16-Jan-08 14:12 
GeneralProblem in opening in vs 2005 Pin
bhaskar jatav18-Dec-07 22:20
memberbhaskar jatav18-Dec-07 22:20 
QuestionFeature request Pin
Dom7-Dec-07 2:05
memberDom7-Dec-07 2:05 
GeneralRe: Feature request Pin
Yap Chun Wei16-Jan-08 14:10
memberYap Chun Wei16-Jan-08 14:10 
GeneralI can't compile the sourcecode Pin
Trabi14-Nov-07 22:39
memberTrabi14-Nov-07 22:39 
GeneralRe: I can't compile the sourcecode Pin
Yap Chun Wei16-Jan-08 14:10
memberYap Chun Wei16-Jan-08 14:10 
QuestionError: Cannot find '/'. Make sure the path is correct. Pin
lz1nwm11-Nov-07 13:37
memberlz1nwm11-Nov-07 13:37 
GeneralTrojan-Downloader.Win32.Zlob.dmx (virus) Pin
lz1nwm23-Oct-07 13:31
memberlz1nwm23-Oct-07 13:31 
Thanks for the great program.

Since last week my anti-virus program recognize TCExplorer.exe as virus. I've read that that Zone Alarm also recognizes this file as virus.

Could you please fix the problem?



Scanning Report
24 October 2007 02:19:36 - 02:19:38
Computer name: NEMO
Scanning type: Scan target
Target: C:\bin\TCExplorer\TCExplorer.exe


Result: 1 malware found
Trojan-Downloader.Win32.Zlob.dmx (virus)


Files: 1
Not scanned: 0
Viruses: 1
Spyware: 0
Suspicious items: 0
Riskware: 0
Disinfected: 0
Renamed: 0
Deleted: 0
Quarantined: 0
Failed: 0
Boot Sectors:
Scanned: 0
Infected: 0
Suspicious items: 0
Disinfected: 0


Definitions version:
Viruses: 2007-10-23_08
Spyware: 2007-10-23_07
Scanning Engines:
F-Secure AVP: 7.00.171, 2007-10-23
F-Secure Libra: 2.04.01, 2007-10-21
F-Secure Orion: 1.02.37, 2007-10-23
F-Secure Draco: 1.00.35, 2007-10-15
Scanning options:
Scan inside archives
Spyware: RemoteAdmin.Win32.WinVNC
Viruses: Ask after scan
Spyware: Ask after scan


Copyright © 1998-2007 Product support | Send virus sample to F-Secure
F-Secure assumes no responsibility for material created or published by third parties that F-Secure World Wide Web pages have a link to. Unless you have clearly stated otherwise, by submitting material to any of our servers, for example by E-mail or via our F-Secure's CGI E-mail, you agree that the material you make available may be published in the F-Secure World Wide Pages or hard-copy publications. You will reach F-Secure public web site by clicking on underlined links. While doing this, your access will be logged to our private access statistics with your domain name. This information will not be given to any third party. You agree not to take action against us in relation to material that you submit. Unless you have clearly stated otherwise, by submitting material you warrant that F-Secure may incorporate any concepts described in it in the F-Secure products/publications without liability.
GeneralRe: Trojan-Downloader.Win32.Zlob.dmx (virus) Pin
Yap Chun Wei23-Oct-07 14:19
memberYap Chun Wei23-Oct-07 14:19 
GeneralRe: Trojan-Downloader.Win32.Zlob.dmx (virus) Pin
lz1nwm11-Nov-07 13:34
memberlz1nwm11-Nov-07 13:34 
GeneralIssues Pin
Mc_Bain18-Sep-07 23:02
memberMc_Bain18-Sep-07 23:02 
GeneralRe: Issues Pin
Yap Chun Wei20-Sep-07 3:08
memberYap Chun Wei20-Sep-07 3:08 
GeneralRe: Issues Pin
Yap Chun Wei28-Sep-07 18:39
memberYap Chun Wei28-Sep-07 18:39 
GeneralRe: Issues Pin
Mc_Bain1-Oct-07 21:07
memberMc_Bain1-Oct-07 21:07 
Generalalternative Pin
donald00714-Sep-07 0:09
memberdonald00714-Sep-07 0:09 
GeneralRe: alternative Pin
Yap Chun Wei17-Sep-07 4:53
memberYap Chun Wei17-Sep-07 4:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web03 | 2.8.190424.1 | Last Updated 9 Oct 2007
Article Copyright 2007 by Yap Chun Wei
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid