I am starting a new topic cause the people in the old one do not understand what I am asking ( trying to learn / figure out ) how to do

I have 24 files in a directory

they are named

12am.txt
1am.txt
2am.txt

ETC ETC

till

11am.txt

then they change to PM

12pm.txc
1pm.txt
2pm.txt

till

11pm.txt

Theses files are already created and in one folder what I want to do is move them from that folder to another folder that already has other files in it as well and overwrite the ones name 11am, etc etc etc

I just need to know how to make a counter that will be assigned to a variable EX $counter so that I can add the copy command to it and move the files to another directory

Thanks for all your help

Basically I want to move those files from directory A to directory B if at all possible in the order of 12am-11am and then 12pm to 11pm

Anyone ?

Oh, I thought you started this threat because everyone on the old thread wanted you to do some work and show your code so they could help you improve it.

But all you were asking for was completed code.

It might also help if you explained why you wanted help on this, what is the project for? It really does look like a school project to me.

You have already been warned previously about starting additional threads for the same question. Just because you do not like the nature of the replies you have gotten does not mean this warrants a new thread.

Closed.

commented: handing out infractions and closing threads cause someone is new and does not know CODE and asks for help does not make what you are doing OK +0
commented: *The orange dot destroyer* +6
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.