Solved

windows FTP server rename with timestamp

Posted on 2007-11-16
5
1,338 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
  • 2
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
pinkisthenewblue earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now