Can I create a folder with current datetime when I use Windows Command-line FTP

Is there any possibility to create a new directory with current datetime when I use the Windows Command-line FTP?

for more clarification if I have scheduler to run this:

C:\windows\system32\ftp -s:ftpMyFiles.txt

And inside ftpMyFiles.txt I have:

open 127.0.0.1 user pass mkdir %DATE% bye

here is the question Can I create A new directory with a datetime here (mkdir %DATE%)?

-------------Problems Reply------------

You have to generate the ftpMyFiles.txt dynamically like:

(
echo open 127.0.0.1
echo user
echo pass
echo mkdir %DATE%
echo bye
) > ftpMyFiles.txt

C:\windows\system32\ftp -s:ftpMyFiles.txt


Note that the value of %DATE% is locale-specific. So make sure you test your batch file on the same locale you are going to actually run it. Otherwise you may get unexpected results. For example on my (Czech) locale the DATE=po 13. 04. 2015

Category:windows Views:63 Time:2017-12-05

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.143 (s). 11 q(s)