Jump to content
Sign in to follow this  
Sparrowlord

Renaming

Recommended Posts

Sparrowlord

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

Share this post


Link to post
Share on other sites
w0uter

$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

Share this post


Link to post
Share on other sites
Sparrowlord

Thanks!! :D

Share this post


Link to post
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
Sign in to follow this  

×