Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Create Remote folder with Timestamp

You need to use absolute paths.

$stamp = $(Get-Date -f "ddMMyyyy")


#Trying create newfolder
$session.CreateDirectory(("/" + $stamp))

# Upload files, collect results
$transferResult = $session.PutFiles($localPath, ("/" + $stamp + "/*"))
kinetix

Create Remote folder with Timestamp

Hi all,
Please excuse me if my question cover some topics, but I can't find exactly my theme.
So, I want upload files in remote folder which is created with timestamp for everyday.

1) I have path /home/user
2) script which find on winscp example - works, but I tried to change.
3) I success to create remote folder with session.CreateDirectory

But, I can't change location on ftp side, after create directory.

I'm using powershell version 1, on windows 2003 server.

Upload scripts as attached file.

Thank you for your time.