Showing posts with label Command Prompt. Show all posts
Showing posts with label Command Prompt. Show all posts

Monday, 10 October 2016

VB.NET Example Code to backup MySQL Database using mysqldump command in VB using Visual Studio 2015

In this post, we will see how to create a simple VB.NET application to backup MySQL database using the same mysqldump command by firing command prompt from the VB application. For this example, I am using Visual Studio 2015 Community edition.

In some examples on the internet, you would also find the use of mysql connectors for Visual Studio. I have also used it and it works. But since in this post, I am directly going to fire the command prompt from the VB application just like we execute mysqldump command directly in command prompt, there is no need to use the mysql connector for backup purposes. It will however be required if your application is going to fetch data display data etc from a MySQL database in the VB application.

The form designed is:
VB.NET Example Code: How to backup MySQL Database using mysqldump command in VB?

Ignoring the other labels, the important form elements used in code are:
Read more �

Batch File Example Code To Backup MySQL Database To A Particular Folder, Append Date and Time, Delete Backups Older Than X Days

Batch File Example Code To Backup MySQL Database To A Particular Folder, Append Date and Time, Delete Backups Older Than X Days
In this post we will see how to make a batch file to take backup of MySQL database (single database) to a particular folder on the same computer. As you may already know, there are various variants of mysqldump command. But for this exercise we will use this command:

mysqldump --routines -u<username> -p<password> <database name> > <output sql file name>

Simple Batch File to backup MySQL Database:
Read more �

Tuesday, 13 September 2016

How to print file names of all or select list of files in a folder to a list?

How to print file names of all or select list of files in a folder to a list?
Suppose we have a lot of files in a folder and we want to get the names of the files in the folder, then we can easily get the names by using a simple DOS Command. If there are only a few, you could just type it or may be do "rename" and copy the file name. But if there are many files, the latter process is going to be a tedious task.

To get the file names of all files in folder or file names of just a select few types, do the following.
Read more �