Thursday, December 08, 2016

How to Copy Files in Command Prompt using xCopy

The Windows Command Prompt can be very powerful once you understand some of the commands. You can get a lot more control with the Command Prompt than you would by copying and pasting in Windows Explorer. Knowing how to make the most out of the copy commands is essential if you're remotely operating a Windows server. It's also great if you want to be more efficient with your own system.

There are different ways to copy files using the Windows Command Prompt. All the commands can copy files from one place to another, but there are several cases where you may want to choose one command over the others.

  • XCOPY - The xcopy command allows you to copy files and directory trees. This makes it much more suitable for copying folders. xcopy also has many modifiers which gives advanced users more control over the copying process. xcopy has been deprecated in favor of robocopy, but still works.

Example: C:\>xcopy c:\webshare\AppData\runtime\bin\admin\*.* c:\_backup\backup_20161208\admin /e /i

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
                           [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
                           [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/B] [/J]
                           [/EXCLUDE:file1[+file2][+file3]...]

  source       Specifies the file(s) to copy.
  destination  Specifies the location and/or name of new files.
  /A           Copies only files with the archive attribute set,
               doesn't change the attribute.
  /M           Copies only files with the archive attribute set,
               turns off the archive attribute.
  /D:m-d-y     Copies files changed on or after the specified date.
               If no date is given, copies only those files whose
               source time is newer than the destination time.
  /EXCLUDE:file1[+file2][+file3]...
               Specifies a list of files containing strings.  Each string
               should be in a separate line in the files.  When any of the
               strings match any part of the absolute path of the file to be
               copied, that file will be excluded from being copied.  For
               example, specifying a string like \obj\ or .obj will exclude
               all files underneath the directory obj or all files with the
               .obj extension respectively.
  /P           Prompts you before creating each destination file.
  /S           Copies directories and subdirectories except empty ones.
  /E           Copies directories and subdirectories, including empty ones.
               Same as /S /E. May be used to modify /T.
  /V           Verifies the size of each new file.
  /W           Prompts you to press a key before copying.
  /C           Continues copying even if errors occur.
  /I           If destination does not exist and copying more than one file,
               assumes that destination must be a directory.
  /Q           Does not display file names while copying.
  /F           Displays full source and destination file names while copying.
  /L           Displays files that would be copied.
  /G           Allows the copying of encrypted files to destination that does
               not support encryption.
  /H           Copies hidden and system files also.
  /R           Overwrites read-only files.
  /T           Creates directory structure, but does not copy files. Does not
               include empty directories or subdirectories. /T /E includes
               empty directories and subdirectories.
  /U           Copies only files that already exist in destination.
  /K           Copies attributes. Normal Xcopy will reset read-only attributes.
  /N           Copies using the generated short names.
  /O           Copies file ownership and ACL information.
  /X           Copies file audit settings (implies /O).
  /Y           Suppresses prompting to confirm you want to overwrite an
               existing destination file.
  /-Y          Causes prompting to confirm you want to overwrite an
               existing destination file.
  /Z           Copies networked files in restartable mode.
  /B           Copies the Symbolic Link itself versus the target of the link.
  /J           Copies using unbuffered I/O. Recommended for very large files.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.

Sunday, November 27, 2016

WhatsApp Will No Longer Work On These Phones

It might be bad news for few WhatsApp users! The company is ending support to a number of devices which will no longer be able to run WhatsApp from December 31. That means if you are right now using older smartphones then you need to replace it right before the year 2016 ends.

The devices that will no longer get support from WhatsApp are:
  1. BlackBerry OS and BlackBerry 10
  2. Nokia S40
  3. Nokia Symbian S60
  4. Android 2.1 and Android 2.2
  5. Windows Phone 7.1
  6. iPhone 3GS/iOS 6

So, those who are using older phones need to upgrade to a newer Android, iPhone or Windows Phone to continue using WhatsApp after December 31, 2016.

EXCEPT and INTERSECT in T-SQL

The UNION, EXCEPT and INTERSECT operators of SQL enable you to combine more than one SELECT statement to form a single result set. The UNION operator returns all rows.

EXCEPT
Returns any distinct values from the query to the left of the EXCEPT operator that are not also returned from the right query.
INTERSECT
Returns any distinct values that are returned by both the query on the left and right sides of the INTERSECT operator.

The INTERSECT operator returns all rows that are in both result sets. The EXCEPT operator returns the rows that are only in the first result set but not in the second

EXCEPT operator is another most important feature in SQL Server which is used to returns distinct rows by comparing the results of two input queries. Both SQL queries within the EXCEPT query, the number and the order of the columns must be the same in the result sets within similar data types.  EXCEPT operator is a very quick and easy way to find differences, especially when needing to get all differences including null.

When using INTERSECT operator the number and the order of the columns must be the same in all queries as well data type must be compatible.

For more Information check MSDN site

Monday, November 21, 2016

Targeting .NET Platforms

You can build apps for many platforms and services by downloading .NET Framework targeting packs and SDKs and using them with Visual Studio.

Check this link for relevant platforms

Tuesday, November 15, 2016

What’s new in Visual Studio 2015 Update 3?

Microsoft released Visual Studio 2015 Update 3, Team Foundation Server (TFS) 2015 Update 3 along with .NET Core 1.0

If you want to know what has been changed, improved in the latest version of Visual Studio 2015 (i.e. in the Update 3), check out the following Microsoft pages which also includes the list of other changes like performance improvements, responsiveness, bug fixes and the known issues currently available:

Before installing this build of Visual Studio 2015 Update 3, I would recommend to checkout the Known Issues currently available in this build. Also checkout the complete Release Notes.

Point to note that, Visual Studio 2015 Update 3 now includes Xamarin 4.1. In addition to a number of bug fixes, this release adds support for tvOS, improves the iOS Assets Catalog support, improves the XML editing experience and adds selectors for SSL/TLS and HttpClient implementations when creating iOS apps.