Solved

windows FTP server rename with timestamp

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I guess it is not common knowledge to most Wintel engineers/administrators: If you have an SNMP-based monitoring system in your environment (and it's common to have SNMP or Syslog) it's reasonably easy to enable monitoring of the Windows Event logs,…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

827 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