Solved

windows FTP server rename with timestamp

Posted on 2007-11-16
5
1,352 Views
Last Modified: 2012-05-05
I am connecting to a windows FTP server and would ike to rename a file.
I can rename it no problem. The problem is that I would like to create a script that can log in to the server
then rename the file with name+timestamp.txt.
Is that possible. I research a little and found a few ways to do that on windows it self but not from the FTP command line.

Thanks
0
Comment
Question by:quippee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
pinkisthenewblue earned 250 total points
ID: 20303754
Hi,

Am i right in guesing you need this script to logon, rename a file? Not a person logs on and a script automatically adds the date to any file renamed? If so, i reccomend using something similiar to the vbscript below (I dont use it very often so you may have to google the ins and outs):

Set ws = CreateObject("WScript.Shell")
ws.Run "cmd", 1, False
Wscript.Sleep 500
ws.SendKeys "telnet 1.1.1.1 25"
Wscript.Sleep 500
ws.SendKeys "{ENTER}"
Wscript.Sleep 500
ws.sendkeys "blah blah blah"
ws.SendKeys "{ENTER}"
Wscript.Sleep 500
ws.sendkeys "you get teh idea
0
 

Author Comment

by:quippee
ID: 20314883
Yes, but actually It was going to be done from an as400 window. Thats why I wanted to find out if it could be done with regular FTP commands. but I can definitely use this for something else.
0
 
LVL 2

Expert Comment

by:pinkisthenewblue
ID: 20341536
Thats a tuffy.... I've never used one of those before... The only thing I can think of is making an app that does it. Should be pretty easy in VB - I've already made a similiar program for my self.
0
 
LVL 2

Assisted Solution

by:egtebert
egtebert earned 250 total points
ID: 20626533
Hi,
I`ve create some FTP programs on the AS400. What I did was have a program create the script. So make an AS400 program that puts in this FTP script file (special name don`t remember how to create it but must be something like CRTFTPF or something :)
In the program you can make a field where you add the file name and add a timestamp to it.
Any I think it best to create a program that creates the script... FTP command won`t do I believe, allready tried that myself as well.
Hope this helps!
0
 
LVL 2

Expert Comment

by:egtebert
ID: 20851341
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question