We pull down files via FTP, these files are in hex format with no extension (eg. 008C334D) and the company that hosts the FTP site has said they can not change these files to have a different filename.
Our internal systems are set to look for files in a local directory starting with W.*
I have found some code that will allow me to put 'W.' at the start of every file so our system will see it and pick it up. (eg. W.008C334D)
Code to do this:
for %%i in (*.*) do (ren "%%i" "W.%%i")
Note: Once our system has picked up this file (W.008C334D) and processes it, the file is renamed to X.* (eg. X.008C334D)
What I would like to do is write some code that says if a file already exists with W.* do not rename it, else I will get W.W.008C334D and so on
As I am not too familiar with batch files and if/else loops, could you please assist me by writing some code to that will only rename file that do NOT start with W.
Thanks for your help in advance
Darren