Friday, April 17, 2015

Automatically rename multiple files from multiple subfolders through windows cmd

I am using the following script through windows cmd in automatically copying multiple files located/sourced from multiple subdirectories to a single directory:




cd /d "C:\example files\various\raw files"

for /r %d in (*) do copy "%d" "C:\example files\conso"


I put \y at the end of the script if I want to ovewrite duplicate files.



However, my dilemma is I want to not overwrite those files, instead automatically renaming them.



Is there any other command in the windows cmd that would try to copy those files and try to rename them if there are duplicates found?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...