retrieveFileSMB: retrieveFileSMB

View source: R/retrieveFileSMB.R

retrieveFileSMBR Documentation

retrieveFileSMB

Description

Use python SMBConnection to retrieve the contents of a file at path on a SMB service_name. If the file already exists on the file_obj, it will be truncated and overwritten.

Usage

retrieveFileSMB(
  username,
  password,
  my_name = Sys.info()[["nodename"]],
  remote_name,
  service_name,
  path,
  domain,
  file_obj,
  port = 445,
  timeout = 30,
  python_location
)

Arguments

username

Your SMB user name

password

Your SMB user password, do not store this in your code!

my_name

The machine you are running this operation on (Default : Sys.info()[["nodename"]])

remote_name

The smb server name

service_name

The service_name name i.e. 'Share'

path

The SMB folder path where your file is e.g. 'Files/Reporting/MyData.csv'

domain

SMB server domain

file_obj

Full file path to put the retrieved data e.g. '/home/username/file.txt'

port

Common port (Default : 445)

timeout

How long to keep the connection open before timeout (Default : 30)

python_location

The location of your python installation

Value

Boolean indicating file exists at file_obj


bwaite-esr/btools documentation built on Sept. 28, 2023, 5:26 p.m.