Good old dir and copy commands

This is a true troubleshooting story!

Today, one of the users of my application wanted to know if we can find out the original title of a ticket created in the Application. Although, we do not store any such logs for modifications, while on the verge of giving up, I remembered we archive the e-mails received by the Windows Service application that processes the e-mails and archives them at a location on the Server on which it is installed. The e-mail Subject line is stored as the ticket title. These tickets which are created by the Windows Service can be viewed in the Web Application.

Since the folder with the archiving e-mails have a lot of ’em, simply doing a Windows Search is a time killer! So I remembered my way through the good old DOS commands.

Since the .eml file has the ticket number, I used the dir command to search for the e-mail name and copy command to copy it to another location quickly.

Firstly cd to the location where the archived e-mails are stored on the Server:

So e.g. if the ticket number is 123456

dir *123456* /s

The /s searches for the File name inside the two wildcard characters asterisk “*” with the dir command.

Then if the file name is e.g. TICKET123456 – abc.eml then use copy command as follows within the same directory:

copy "TICKET123456 - abc.eml" c:\Temp

So, with the e-mail having the original Subject Line preserved, I could share the original ticket title.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.