hpcfile put

 

Applies To: Microsoft HPC Pack 2012, Microsoft HPC Pack 2012 R2

Uploads one or more files to a cluster node. The file can come from the local computer or from a shared folder on the network.

Note

This subcommand was introduced in HPC Pack 2008 R2 with Service Pack 1 and is not supported in previous versions.

Syntax

hpcfile put [/scheduler:{address}] [/head:{length}] [/tail:{length}] [/quiet:{true|false}] [/lines:{true|false}] [/targetnode:{node}] [/file:{path}] [/destfile:{path}] [/encoding:{encoding}] [/nofoldercreation:{true|false}]

hpcfile put {/? | /help}

Parameters

Parameter

Description

/scheduler

The name of the cluster head node.

/targetnode

Specifies the node name or IP address of the cluster node.

You can only specify one target node.

/encoding

Specifies the encoding of the source file. If this parameter is not specified, the encoding is determined by examining the first several bytes of the file. Utf-8, little-endian Unicode, and big-endian Unicode are automatically recognized. You should specify this parameter when the encoding of the source file cannot be automatically recognized.

/file

The fully qualified path of the source file (that is, the file that you want to upload). This can be a path on the local computer, or a path to a shared folder on the network.

You can use the asterisk (*) as a wildcard character.

For example, to upload all text files in C:\Users\myName, specify: C:\Users\myName\*.txt

/destfile

The fully qualified path of the destination folder on the cluster node (that is, where you want to save the uploaded files).

If you are uploading a single file and want it saved with a different name, you can specify a file name. For example, C:\Users\myName\myCopy.txt.

/lines

When /lines is set to false (default), the <length> value of the /head or /tail parameter is interpreted as the number of bytes. When /lines is set to true, the <length> value of /head or /tail parameter is interpreted as the number of lines. The short form of this option is /l.

/nofoldercreation

or

/n

When true, hpcfile returns an error message if the destination folder does not exist.

When false, hpcFile creates the folder if the destination folder does not exist.

By default, this is false (a folder is created automatically).

/head

If specified, the command only operates on the first <length>bytes or lines of the file.

For example, to operate on the first 4 KB of a file, specify the parameter as follows: /head:4096. This example requires /lines to be set to false.

/tail

If specified, the command only operates on the last <length>bytes or lines of the file.

For example, to operate on the last 4 KB of a file, specify the parameter as follows: /tail:4096. This example requires /lines to be set to false.

/?

Displays Help at the command prompt.

/help

Displays Help at the command prompt.

Examples

To upload all text files (.txt) from C:\Users\myName on the local computer and save them to C:\myFiles on NODE002:

hpcFile put /scheduler:myHeadNode /targetNode:NODE002 /file: "C:\Users\myName\*.txt" /destFile: "C:\myFiles"