Unfortunately the task isn't as clear as it needs to be - for me
For this example, I take it that we are talking about squad definition files as found in the "Paintschemes/blue" folder for instance.
And I take it that you want the null.tga file from "Paintschemes/decals" to be copied to correspondingly named tga files according to the files without extension found e.g. in the "Paintschemes/blue", to some other folder, e.g. "Paintschemes/decals/blue".
Then this would be your script:
@echo off
REM This script is intended to be used to create "void" squadron insignia batches
REM by taking an input folder with squadron definition files (filenames w/o extension) from folder "X"
REM and copying the "null" TGA file from IL-2's "PaintSchemes/decals" folder to folder "Y", using
REM the names from the files found in folder "X", accordingly
REM
REM Calling convention:
REM create_squad_voids "<folder X>" "<folder Y>" "<path to null.tga>"
REM
REM e.g. create_squad_voids ./blue ./decals/blue ./decals/null.tga
REM
REM
REM The two folder parameters can use absolute or relative paths
if not exist "%~dpnx2" mkdir "%~dpnx2"
for %%i in (%~dpnx1/*.) do (
copy "%~dpnx3" "%~dpnx2/%%~nxi.tga"
)
If the real task differs from what my crazy mind managed to read out of the OP, then please be a tad more specific on what you're intending to do.
Mike
Thanks Mike for your help!
I try to explain better (I think you have anyway done what my donkey mind have badly traduced in english)
1) I have a made a lot of new units file (those have only a name without etension) and these could be now placed (for cloning) in a folder named Paintschemes/Blue
2) I have a single Alpha channel only named null.tga for a not showing emblem in folder Paintschemes/Decals
3) I run your batch and I got , in a sub folder Paintschemes/Decals/Blue (is this generated from the bat or I have to create it before run the bat?) , a serie of copies of the null.tga named with the names of the files from folder Paintschemes/Blue....
Is that right?
To use the bat:
IIUC....I have to:
1) Create the bat by copying your script in a text file and save it with .bat extension
2) Create folder Paintschemes
3) Put here the .bat
4) Create subfolder Blue with all the new unit files (ex. 100 file)
5) Create the subfolder Decals with the null,tga file
6) Create the sub/subfolder Paintschemes/Decals/Blue
7) run the bat
8 ) open the Paintschemes/Decal/Blue subfolder and FINALLY I'll find 100 cloned .tga with the 100 unit names
Have I understand and studied to make it work correctly?
Thanks again in advance for your help!