📄 fssrv.script
字号:
c:\tmp\project5.xml 10 32:exmp.:eul.:h4.Examples:p.In the following examples, assume the command is being issued locally frommachine TestSrv1.:p.:ul.:li.:hp2.Goal::ehp2. Copy directory c:/testcase from machine TestSrv1 to directoryc:/testcase on machine Client1.br:hp2.Syntax::ehp2. :xph.COPY DIRECTORY c:/testcase TOMACHINE Client1:exph.:p.:li.:hp2.Goal::ehp2. Copy directory c:/testcase and its subdirectories from machine TestSrv1to directory c:/testcase on machine Client1..br:hp2.Syntax::ehp2. :xph.COPY DIRECTORY c:/testcase TOMACHINE Client1 RECURSE:exph.:p.:li.:hp2.Goal::ehp2. Copy directory c:/testcase from machine TestSrv1 to directory d:/WebTestson machine Client1. Don't overwrite the directory if it exists..br:hp2.Syntax::ehp2. :xph.COPY DIRECTORY c:/testcase TODIRECTORY d:/WebTests TOMACHINE Client1 FAILIFEXISTS:exph.:p.:li.:hp2.Goal::ehp2. Copy all files with an extension of "tmp" in directory c:/testcase todirectory c:/testcase on machine Client1. Match the extension in a case insensitivemanner. Do not recurse down subdirectories..br:hp2.Syntax::ehp2. :xph.COPY DIRECTORY c:/testcase TOMACHINE Client1 EXT tmp CASEINSENSITIVE:exph.:p.:li.:hp2.Goal::ehp2. Recursively copy all files under {MyTempDirectory} with a base name beginningwith "test" to directory {MyTempDirectory} on machine Client1. Match the file names in acase sensitive manner. Do not report any errors during the copying. Don't create thedirectory if it does not exist on the target machine..br:hp2.Syntax::ehp2. :xph.COPY DIRECTORY {MyTempFiles} TOMACHINE Client1 NAME "test*" CASESENSITIVE RECURSE IGNOREERRORS:exph.:eul.:p.In the following examples, assume the command is being issued locally frommachine TestSrv1 and the following directory structures exist under the c:/testcase directory::xmp. c:\testcase c:\testcase\error.txt c:\testcase\web.exe c:\testcase\web.txt c:\testcase\web.xml c:\testcase\subdir c:\testcase\subdir\subdir_1 c:\testcase\subdir\subdir_2 c:\testcase\subdir\subdir_2\readme.txt:exmp.:p.:ul.:li.:hp2.Goal::ehp2. Copy directory c:/testcase and its subdirectories, including empty subdirectories,from machine TestSrv1 to directory c:/testcase on machine Client1..br:hp2.Syntax::ehp2. :xph.COPY DIRECTORY c:/testcase TOMACHINE Client1 RECURSE KEEPEMPTYDIRECTORIES:exph.:p.The expected result is that the following entries exist on machine Client1::xmp. c:\testcase c:\testcase\error.txt c:\testcase\web.exe c:\testcase\web.txt c:\testcase\web.xml c:\testcase\subdir c:\testcase\subdir\subdir_1 c:\testcase\subdir\subdir_2 c:\testcase\subdir\subdir_2\readme.txt:exmp.:p.:li.:hp2.Goal::ehp2. Copy directory c:/testcase and its subdirectories from machine TestSrv1 todirectory c:\testcase on machine Client1. However, do not copy any files..br:hp2.Syntax::ehp2. :xph.COPY DIRECTORY c:/testcase TOMACHINE Client1 RECURSE ONLYDIRECTORIES:exph.:p.The expected result is that the following entries were created on machine Client1::xmp. c:\testcase c:\testcase\subdir c:\testcase\subdir\subdir_1 c:\testcase\subdir\subdir_2:exmp.:p.:li.:hp2.Goal::ehp2. Copy all files from machine TestSrv1 in directory c:/testcasewhose name is 'web' to directory /testcase on machine Client1.Convert the line-ending characters in the files whose extensions are'txt' or 'xml' (as they are considered to be text files) to theline-ending characters for machine Client1's platform. :p.:hp2.Syntax::ehp2. Note that both of these :xph.COPY DIRECTORY:exph. examples are equivalent.:xmp.COPY DIRECTORY c:/testcase TODIRECTORY /testcase TOMACHINE Client1 NAME web TEXTEXT txt TEXTEXT xml COPY DIRECTORY c:/testcase TODIRECTORY /testcase TOMACHINE Client1 NAME web TEXTEXT txt TEXTEXT xml FORMAT Native:exmp.:p.The expected result is that the following entries were created on machine Client1.Note that error.txt was not copied since its name is not 'web'.:xmp. /testcase /testcase/web.exe /testcase/web.txt /testcase/web.xml:exmp.:p.:li.:hp2.Goal::ehp2. Copy all .txt files from machine TestSrv1 in directory c:/testcase,and it's subdirectories, to directory /testcase onmachine Client1. Convert the line-ending characters in all the files being copied(as they are considered to be text files) to the line-ending characters for machineClient1's platform.:p.:hp2.Syntax::ehp2. Note that both of these :xph.COPY DIRECTORY:exph. examples are equivalent.:xmp.COPY DIRECTORY c:/testcase TODIRECTORY /testcase TOMACHINE Client1 EXT txt TEXTEXT "*" RECURSE COPY DIRECTORY c:/testcase TODIRECTORY /testcase TOMACHINE Client1 EXT txt TEXTEXT txt FORMAT Native RECURSE:exmp.:p.The expected result is that the following entries were created on machine Client1.:xmp. /testcase /testcase/error.txt /testcase/subdir /testcase/subdir/subdir_2 /testcase/subdir/subdir_2/readme.txt:exmp.:eul.:p.In the following examples, assume the command is being issued to machineClient1 from machine TestSrv1.:p.:ul.:li.:hp2.Goal::ehp2. Retrieve all files in directory d:\WebTests\Logs from Client1 and storethem in directory f:\Logs on machine TestSrv1. Do not copy its subdirectories..br:hp2.Syntax::ehp2. :xph.COPY DIRECTORY d:/WebTests/Logs TODIRECTORY f:/Logs:exph.:p.:li.:hp2.Goal::ehp2. Copy directory d:\WebTests\Logs and its non-empty subdirectories from Client1 to directory h:\Logs on server LogSrv..br:hp2.Syntax::ehp2. :xph.COPY DIRECTORY d:/WebTests/Logs TODIRECTORY h:/Logs TOMACHINE LogSrv RECURSE:exph.:p.:li.:hp2.Goal::ehp2. Copy directory d:\WebTests\Logs and its non-empty subdirectories fromClient1 to directory h:\Logs on Client1..br:hp2.Syntax::ehp2. :xph.COPY DIRECTORY d:/WebTests/Logs TODIRECTORY h:/Logs TOMACHINE local RECURSE:exph.:p.:li.:hp2.Goal::ehp2. Copy all .cmd files in the root of the boot drive from Client 1 to theroot of the boot drive of machine TestSrv1..br:hp2.Syntax::ehp2. :xph.COPY DIRECTORY {STAF/Config/BootDrive}\ EXT cmd:exph.:eul..*.*---------------------------------------------------------------------.*:ih1.service commands:ih2.GET FILE:i3.file system service:h3 id=fsgetfile.GET FILE:p.GET FILE retrieves the contents of a file.:h4.Syntax:xmp.GET FILE <FileName> &lbrk.&lbrk.TEXT | BINARY&rbrk. &lbrk.FORMAT <Format>&rbrk.&rbrk.:exmp.:p.:xph.FILE:exph. specifies the name of the file to get. &varres.:p.:xph.TEXT:exph. specifies to convert line-ending characters in the file beingretrieved as specified via the :xph.FORMAT:exph. option and to perform codepage conversion.This option should only be specified for a text file, not a binary file.This is the default.:p.:xph.BINARY:exph. specifies to retrieve the contents of the file in binary.:p.:xph.FORMAT:exph. specifies the format of the file's contents. &varres.:ul.:li.If the :xph.TEXT:exph. option is specified, the following formats are supported&colon.:p.:ul compact.:li.:xph.NATIVE:exph. specifies to convert line-ending characters in the file(s)to those of the target machine so that the line-ending characters are appropriateto the target platform. This is the default.:li.:xph.UNIX:exph. specifies to converts line-ending characters in the file(s)to the line-ending characters for Unix.:li.:xph.WINDOWS:exph. specifies to convert line-ending characters in the file(s)to the line-ending characters for Windows.:li.:xph.ASIS:exph. specifies that no conversion of line-ending characters in the filebe done. This value is only supported for a :xph.GET FILE:exph. request.Note that prior to STAF V2.5, this was the default (as the :xph.TEXT:exph. option was notyet implemented).:li.:xph.<String>:exph. specifies to convert line-ending characters in the file(s)to the specified string.:eul.:li.If the :xph.BINARY:exph. option is specified, the following formats are supported&colon.:p.:ul compact.:li.:xph.Hex:exph. - Converts the contents of the file to a Hex representation.:eul.:eul.:h4.Security:p.&seclvl. 4.:h4.Return Codes:p.All return codes from GET FILE are documented in :hdref refid=retcode..:h4.Results:p.On successful return, the result buffer will contain the contents of thespecified file.:h4.Examples:p.:ul.:li.:hp2.Goal::ehp2. Retrieve the contents of the CONFIG.SYS file as text.Convert any line-ending characters to those of the platform of the machinemaking the request..br:hp2.Syntax::ehp2. Note that all of these :xph.GET FILE:exph. examples are equivalent.:xmp.GET FILE {STAF/Config/BootDrive}/CONFIG.SYSGET FILE {STAF/Config/BootDrive}/CONFIG.SYS TEXTGET FILE {STAF/Config/BootDrive}/CONFIG.SYS TEXT FORMAT Native:exmp.:p.:li.:hp2.Goal::ehp2. Retrieve the contents of the STAF configuration file as text.Convert any line-ending characters in the file being retrieved to theline-ending characters for Unix..br:hp2.Syntax::ehp2. :xph.GET FILE {STAF/Config/STAFRoot}/bin/STAF.cfg TEXT FORMAT Unix:exph.:p.:li.:hp2.Goal::ehp2. In this example, assume the command is being issued toa Unix machine from a Windows machine. Retrieve the contents of file/testcases/test1.txt as text and convert the line-ending characters to the line-ending characters for Windows..br:hp2.Syntax::ehp2. :xph.GET FILE /testcases/test1.txt TEXT FORMAT Windows:exph.:p.:li.:hp2.Goal::ehp2. Retrieve the contents of file /testcases/test1.txt as text andconvert the line-ending characters to a space..br:hp2.Syntax::ehp2. :xph.GET FILE /testcases/test1.txt TEXT FORMAT " ":exph.:p.:li.:hp2.Goal::ehp2. Retrieve the contents of file c:/testcases/test1.cmp in binaryand display its contents in hex..br:hp2.Syntax::ehp2. Note that both of these :xph.GET FILE:exph. examples are equivalent.:xmp.GET FILE c:/testcases/test1.cmp BINARYGET FILE c:/testcases1/test1.cmp BINARY FORMAT HEX:exmp.:eul..*.*---------------------------------------------------------------------.*:ih1.service commands:ih2.GET ENTRY:i3.file system service:h3 id=fsgete.GET ENTRY:p.GET ENTRY retrieves an attribute of a file system entry, such as its type,size, or last modification time.:h4.Syntax:xmp.GET ENTRY <Name> <TYPE | SIZE | MODTIME>:exmp.:p.:xph.ENTRY:exph. specifies the name of the file system entry for which toretrieve an attribute. &varres.:p.:xph.TYPE:exph. specifies that the type of the file system entry should beretrieved.:p.:xph.SIZE:exph. specifies that the size of the file system entry should beretrieved.:p.:xph.MODTIME:exph. specifies that the last modification time of the filesystem entry should be retrieved.:h4.Security:p.&seclvl. 2.:h4.Return Codes:p.All return codes from GET ENTRY are documented in :hdref refid=retcode..:h4.Results:p.On successful return, the contents of the result buffer will depend on theattribute type requested.:p.:ul.:li.If the :xph.TYPE:exph. option is specified, the result bufferwill contain one of the following letters::table cols='* 2*' align='c l'.:tcap.File System Entry Types Reference:thd.:c.Type identifier:c.Description:ethd.:row.:c.F:c.File:row.:c.D:c.Directory:row.:c.P:c.Pipe:row.:c.S:c.Socket:row.:c.L:c.Symbolic link:row.:c.B:c.Block device:row.:c.C:c.Character device:row.:c.O:c.Other undefined type:row.:c.?:c.Unknown type:etable.:p.:li.If the :xph.SIZE:exph. option is specified, the result buffer will containa marshalled :xph.<Map&colon.STAF/Service/FS/SizeInfo>:exph. representingthe 64-bit size of the file system entry.The map is defined as follows: :table cols='* * * *'.:tcap.Definition of map class STAF/Service/FS/SizeInfo:tnote text='Description'.This map class represents the 64-bit size ofthe file system entry.in a directory.:thd.:c.Key Name:c.Display Name:c.Type:c.Format / Value:ethd.:row.:c.upperSize:c.Upper 32-bit Size:c.&stringObj.:c.:row.:c.lowerSize:c.Lower 32-bit Size:c.&stringObj.:c.:etable.:p.:li.If the :xph.MODTIME:exph. option is specified, the result buffer willcontain the last modification time of the file system entry in a string withformat :xph.YYYYMMDD-HH&colon.MM&colon.SS:exph.:eul.:h4.Examples:p.:ul.:li.:hp2.Goal::ehp2. Retrieve the type of the file system entryC&colon.\Stuff\WhatIsIt.d.br
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -