Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Windows Server 2008 Server Core : Replacing Existing Files with the Replace Utility, Taking Ownership of Files with the TakeOwn Utility

- Windows 10 Product Activation Keys Free 2019
- How to active Windows 8 without product key
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
12/9/2012 4:55:49 PM

1. Replacing Existing Files with the Replace Utility

The Replace utility replaces a file in a destination folder with a file from a source folder. You can use it to copy files in a source folder to a destination without worrying and all of the usual warnings that Windows provides. The utility can also place unique files from the source folder into a destination folder. This utility uses the following syntax:

REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]
REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]

Notice that the two command lines use distinctly different command line switch sets. For example, you can't use the /A and the /S command line switches together. The following list describes each of the command line arguments.


drive1/drive2

Specifies the drive for the source and destination. The default is the current drive.


path1/path2

Specifies the absolute or relative path to use for the source and destination. The source must be different from the destination. The default is the current directory.


filename

Defines the file or directory that you want to replace. You can use wildcard characters with this command. See the "Working with Wildcard Characters" sidebar for details.


/A

Adds any new files to the destination directory. Normally, the Replace utility will only replace files. You cannot use this command line switch with the /S or /U switches.


/P

Prompts the user for confirmation prior to replacing a file or adding a new file.


/R

Replaces read-only files, as well as unprotected files. By default, the Replace utility only replaces standard read/write files.


/S

Replaces all of the files in subdirectories of the destination directory. The Replace utility replaces all occurrences of the file. If a destination directory and a subdirectory both contain an instance of a file, the Replace utility replaces both instances of that file. You can't use this command line switch with the /A switch.


/W

Waits for the user to insert a floppy disk or other removable media before beginning the replacement. Generally, you'd use this option as part of a batch file where the replacement requires more than one disk.


/U

Replaces files that are older than the source files. When the destination files are the same age or newer than the source files, the Replace utility doesn't replace them. This command line switch is a safety feature that ensures you don't overwrite newer updates with older files.

2. Taking Ownership of Files with the TakeOwn Utility

Server Core provides a new method of taking ownership of a file using the TakeOwn utility. Given the importance that User Account Control (UAC) places on ownership for security reasons, using this utility could help you around some of the problems that UAC can create in user access. In some cases, you might find that you have to take ownership of a file to manipulate it effectively. The TakeOwn utility uses the following syntax.

TAKEOWN [/S system [/U [domain\]username [/P [password]]]] /F filename [/A] [/R
[/D prompt]]

					  

The following list describes each of the command line arguments.


/S
system

Specifies the remote system that you want to check. In most cases, you'll also need to supply the /U and the /P command line switches when using this switch.


/U
[domain\]user

Specifies the username on the remote system. This name may not match the username on the local system. You'll need to supply a domain name when working with a domain controller.


/P
[password]

Specifies the password for the given user. You can provide the command line switch without specifying the password on the command line in cleartext. The system prompts you for the password. Using this feature can help you maintain the security of passwords used on your system.


/F
filename

Specifies the object that you want to own. The object can be a file or directory. You can include a sharename when required. TakeOwn also lets you use wildcard characters to define the file or directory specification.


/A

Gives the Administrators group ownership of the object, instead of the current user (or the user whose credentials you supplied).


/R

Performs a recursive search for files meeting the file specification. TakeOwn searches the current directory first, and then all subdirectories.


/D prompt

Provides a default answer when the current user doesn't have the list folder permission for a particular directory. The acceptable answers are Y to take ownership of the directory or N to skip the directory.


Other -----------------
- Microsoft Dynamic GP 2010 : Tools for Dynamics GP
- Microsoft Dynamic GP 2010 : Purchase Order Processing
- Windows Server 2003 : Protecting Hosts with Windows Host Firewalls - Internet Connection Sharing
- Windows Server 2003 : Protecting Hosts with Windows Host Firewalls - Firewall Basics
- Collaborating Within an Exchange Environment Using Microsoft Office SharePoint Server 2007 : Exploring Basic MOSS Features
- Collaborating Within an Exchange Environment Using Microsoft Office SharePoint Server 2007 : Understanding the History of SharePoint Technologies, Identifying the Need for MOSS 2007
- Managing SharePoint 2010 with Windows PowerShell : Managing SharePoint 2010 Web Applications
- Managing SharePoint 2010 with Windows PowerShell : Managing Permissions in SharePoint 2010, Managing Content Databases in SharePoint 2010
- BizTalk 2010 : ASDK SQL adapter examples (part 4) - Composite Operations
- BizTalk 2010 : ASDK SQL adapter examples (part 3) - Query notification and multiple result sets
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
Celebrity Style, Fashion Trends, Beauty and Makeup Tips.
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server