How to use xcopy to copy folders with same name from all partitions to a backup partition

I have a folder repeated in all partitions, with the same name but different contents. I need to copy these folders to another partition in a few lines of code, but not once for each partition, such as Xcopy c:\userroot\storage G:\backup\ This would need to be repeated for many partitions: C D E F H … Read more

Start VirtualBox vm via cmd.exe and hide the cmd.exe window just after

The following command will start a Virtual Box VM in Headless mode: “C:\Program Files\Oracle\VirtualBox\VBoxHeadless.exe” –startvm Slack131 I have it in a .bat file. After double-clicking the .bat script the command gets executed, the vm runs and the cmd.exe window keeps open. I saw a different behavior with a MySQL server I’ve used some time ago. … Read more

Cannot connect to FTP server on Windows 10

I can’t add new E-mail Accounts (IMAP/SMTP) using any e-mail clients – not even Outlook. I can’t connect to FTP anymore either. Firewall and Anti-Virus software can be ruled out. Not only have I disabled them and un-installed them completely, I have also completely formatted my PC and attempted to connect to my FTP server. … Read more

How can I run Chrome from commandline after closing explorer.exe with taskkill?

I have an old PC (I mean really old!) and it crashes every time I use Chrome. So I came with a bright idea. Why not close Explorer and run Chrome at the same same time using taskkill through a batch file. So I placed chrome.exe along with the batch file on my desktop. Now … Read more

running a program in a subdirectory

Say my current working directory is C:\Users\neubert\Documents\ or something. Let’s also say that I have a subdirectory in that directory – subdir – and a file in that subdirectory – filename.exe. When I’m in C:\Users\neubert\Documents\ with cmd and then do subdir\filename I get a The system cannot find the path specified. error. So is it … Read more

Why does switching back to a normal drive from a colon-lettered drive only work intermittently?

With the subst command, one can create “drives” identified by any symbol, so this works: subst *: C:\path *: The prompt then shows *:\>. Proof: subst :: C:\path also works, but the new colon-lettered drive can only be switched to with cd /d “::\” because :: indicates a comment. The interesting part is that typing … Read more

how to expand to full path file name according to path variable in cmd

As I thought, the variable expand command: %~dp$PATH:I is used for iterating through the paths in %path% variable and find the first occurrence in which contains the file name specified by the variable %I,then expand the %I to the full path filename. And it is exactly what I want to do in my .bat file, … Read more