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

Getting exit code from xcopy when it’s embedded in cmd.exe

I’m using xcopy this way: p = New Process psi = p.StartInfo AddHandler p.ErrorDataReceived, AddressOf NetErrorDataHandler psi.Arguments = “/C “xcopy *SOURCE* *TARGET*” psi.FileName = “cmd.exe” psi.WindowStyle = ProcessWindowStyle.Minimized psi.UseShellExecute = False psi.CreateNoWindow = True p.Start() p.WaitForExit() p.Close() It’s working. Yet I’m wondering if that’s possible to get its exit codes (mentioned here) when it’s embedded … 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

cmd.exe at \\computername to run on remote machine

My original problem was the NirCmd remote \\PC_D … (http://www.nirsoft.net/utils/nircmd.html) was failing. I tracked that down to it using at \\computername command which is not working on all machines. The local use of at time … works fine on all machines. I have three PCs (let’s call them PC_L,PC_D,PC_H) and two of them are getting … Read more