Solved

windows FTP server rename with timestamp

Posted on 2007-11-16
5
1,363 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
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 …
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

623 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