Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

windows FTP server rename with timestamp

Posted on 2007-11-16
5
Medium Priority
?
1,367 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 750 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 750 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

721 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