Advertisement

05.09.2008 at 09:49AM PDT, ID: 23390094
[x]
Attachment Details

Batch script - Inserting timestamps into filenames for uploading to an FTP server

Asked by colorbars in Windows Batch Scripting, Miscellaneous Programming, File Transfer Protocol (FTP)

Tags: Microsoft Windows, 2003 Server, ftp upload script insert timestamp into filename

I need to build a script for uploading files to an FTP server from a folder on one of my servers.  How do I insert a timestamp into the filename at the time of upload so each file is unique when it gets to the FTP server?  I already have an upload script that uploads multiple files to the FTP server just fine.  I need to know how to insert the timestamp into the filename, however.  Thanks for any and all help!

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
@echo off
echo user username> ftpcmd.dat
echo password>> ftpcmd.dat
rem echo ascii>> ftpcmd.dat
echo mput %1>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -i -n -s:ftpcmd.dat ftp.sound-tele.huh
del ftpcmd.dat
 
rem del \tempFTP\*.txt
 
Loading Advertisement...
 
[+][-]05.09.2008 at 10:30AM PDT, ID: 21534948

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Windows Batch Scripting, Miscellaneous Programming, File Transfer Protocol (FTP)
Tags: Microsoft Windows, 2003 Server, ftp upload script insert timestamp into filename
Sign Up Now!
Solution Provided By: knightEknight
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.09.2008 at 10:35AM PDT, ID: 21534979

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.09.2008 at 10:41AM PDT, ID: 21535023

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.09.2008 at 11:30AM PDT, ID: 21535355

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.09.2008 at 11:58AM PDT, ID: 21535565

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.09.2008 at 01:25PM PDT, ID: 21536184

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.09.2008 at 07:20PM PDT, ID: 21537595

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.10.2008 at 01:02PM PDT, ID: 21540337

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.10.2008 at 03:33PM PDT, ID: 21540769

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628