Jump to content

Renaming


Recommended Posts

I am trying to rename 2 files as I upload them, but the following code below dont work, so if you could help I would like that.

$pcn = @ComputerName
$op = output.txt
$log = report.ini

$Ftpp = _FtpPutFile($Conn, $path & "output.txt", '/dev/$pcn-$op')
$Ftpp = _FtpPutFile($Conn,  $path & "report.ini", '/dev/$pcn-$log')

The format of the name I was trying to get is like "@ComputerName-output.txt" and ComputerName-report.ini" but with the real computer name there.

Thanks,

Lord

Link to comment
Share on other sites

$pcn = @ComputerName
$op = 'output.txt'
$log = 'report.ini'

$Ftpp = _FtpPutFile($Conn, $path & "output.txt", '/dev/' & $pcn & '-' & $op)
$Ftpp = _FtpPutFile($Conn, $path & "report.ini", '/dev/' & $pcn & '-' & $log)

Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...