Topic "A way to mkdir with today's date variable?"

Author Message
[View user's profile]

Joined: 2009-09-21
Posts: 2
Hi there.

First, thanks for the excellent program and its user-friendly scripting!

My question: Is there a way to create a directory using a variable such as the current date and/or time?

I've got to ftp download a large number of files every day and would like to have WinSCP locally create a directory using the current date.

Please give me a few explicit examples, as I'm a newbie with advanced scripting.

Thank you!

[View user's profile]

Joined: 2009-09-21
Posts: 2
For those of you needing something similar, here's a DOS Batch script you can run to create a directory with the timestamp as the name.

set hh=%time:~0,2%
if "%time:~0,1%"==" " set hh=0%hh:~1,1%
MD C:\Archive\
Move D:\downloads\*.* C:\Archive\

Put the above into a text file, rename the extension to .bat and schedule it after how many ever hours it takes for your download to complete.

You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License