Marcel1958
Technical User
In a directory i have several files. For example the following names:
jan.001
jan001.001
jan002.001
feb.001
feb002.
1
i will check if there are files in the directory starting with name jan (this can be different each time i start the script so i have to use an variable)
2
if exist move the first file found to another directory and
rename the file to xxx.001
3
if not exist stop the script
So the first time the script runs it must move the file jan.001 to another dir.
The second time it must be the file jan001.001
Any help is welcom.
Greetings
Marcel
jan.001
jan001.001
jan002.001
feb.001
feb002.
1
i will check if there are files in the directory starting with name jan (this can be different each time i start the script so i have to use an variable)
2
if exist move the first file found to another directory and
rename the file to xxx.001
3
if not exist stop the script
So the first time the script runs it must move the file jan.001 to another dir.
The second time it must be the file jan001.001
Any help is welcom.
Greetings
Marcel