Tag: folders

Encryption, Privacy, Security, Truecrypt

How to Encrypt Files/Folders using TrueCrypt

TrueCrypt is software for establishing and maintaining an on-the-fly-encrypted volume (data storage device). On-the-fly encryption means that data is automatically encrypted right before it is saved and decrypted right after it is loaded, without any user intervention. No data stored on an encrypted volume can be read (decrypted) without using the correct password/keyfile(s) or correct …

C#

List all subfolders in C#

Use the following code to list all subdirectories of a folder. try { String[] allfolders = System.IO.Directory.GetDirectories("C:\", "*", System.IO.SearchOption.TopDirectoryOnly); if (allfolders.Length == 0) Console.WriteLine("empty"); else foreach (String folder in allfolders) Console.WriteLine(folder.Substring(folder.LastIndexOf("\") + 1) ); } catch (Exception) { //… }try { String[] allfolders = System.IO.Directory.GetDirectories("C:\", "*", System.IO.SearchOption.TopDirectoryOnly); if (allfolders.Length == 0) Console.WriteLine("empty"); else foreach (String …

Linux, Ubuntu

Ubuntu – List remote host shared folders

Usage: smbclient -U <username> -L <hostname>smbclient -U <username> -L <hostname> smbclient -U <username> -L <ip address>smbclient -U <username> -L <ip address> Example: smbclient -U test -L 192.168.10.5smbclient -U test -L 192.168.10.5 Results: Enter test’s password: Domain=[TESTING] OS=[Windows 7] Server=[Windows 7] Sharename Type Comment ——— —- ——- ADMIN$ Disk Remote Admin C$ Disk Default share E …

Backup, Microsoft Windows, Sync

Windows Synchronize files and folders

SyncToy is a free application that synchronizes files and folders between locations. Typical uses include sharing files, such as photos, with other computers and creating backup copies of files and folders. System Requirements > Microsoft .NET Framework v2.0 > 1GHz Intel P3 processor or equivalent > 256MB RAM, 512MB RAM recommended > 20MB free disk …

Microsoft Windows, Python

List files and folders in a directory – Python

Let’s see an easy way to list all files and folders in a directory: import os   for filename in os.listdir("x:\mydir1\mydir2\"): print(filename)import os for filename in os.listdir("x:\mydir1\mydir2\"): print(filename) Open command line, change to the directory of your python file and issue the following command: python myfile.pypython myfile.py