Hi,
I started a small project (my first) using a batch file to grab a file then send it via FTP to another server. It's working well but now I need that file to automatically be renamed each time it's generated. I'm very new to batch files/scripts and could use some help if possible.
Here are my details...
The file is generated by an app. It spits it out with the same filename each time. My batch file so far, copies it into a folder I've named FTP. Once it's there, it gets sent via FTP to another server. Somewhere in this batch file, I would like the target file to be uniquely renamed, ie: it's called xyz.txt now. Since it's sent via the FTP transfer many times though the day, it needs to be unique so the receiving server does not overwrite it each time it comes across the pipe. I was thinking maybe adding the date and or time would do the trick, but would be happy if the file simply had a number added to it like xyz1, xyz2, xyz3.txt and so on. If anyone out there is familiar with how I can accomplish this, you'd make my day! I apologize if this post should be in another forum.
Thanks for your help!
I started a small project (my first) using a batch file to grab a file then send it via FTP to another server. It's working well but now I need that file to automatically be renamed each time it's generated. I'm very new to batch files/scripts and could use some help if possible.
Here are my details...
The file is generated by an app. It spits it out with the same filename each time. My batch file so far, copies it into a folder I've named FTP. Once it's there, it gets sent via FTP to another server. Somewhere in this batch file, I would like the target file to be uniquely renamed, ie: it's called xyz.txt now. Since it's sent via the FTP transfer many times though the day, it needs to be unique so the receiving server does not overwrite it each time it comes across the pipe. I was thinking maybe adding the date and or time would do the trick, but would be happy if the file simply had a number added to it like xyz1, xyz2, xyz3.txt and so on. If anyone out there is familiar with how I can accomplish this, you'd make my day! I apologize if this post should be in another forum.
Thanks for your help!