Foldername first letter of filename
Posted: 16 Jan 2019 13:10
I have a large number of files in a folder structure.
I need to address them via a batch.
How do I get the first letter of a filename?
Structure:
\A\A
\A\AUHUIHHU
\A\AZZZAHHH
\B\BABBBA
\B\BUHAHHA
etc.
Filenames can start with letters A-Z and numbers 0-9.
I have the filename in %1
Example:
BUHAHHA
Batch:
COPY \B\BUHAHHA \TEMP\
So, I need the \B\ from the first letter of BUHAHHA
I need to address them via a batch.
How do I get the first letter of a filename?
Structure:
\A\A
\A\AUHUIHHU
\A\AZZZAHHH
\B\BABBBA
\B\BUHAHHA
etc.
Filenames can start with letters A-Z and numbers 0-9.
I have the filename in %1
Example:
BUHAHHA
Batch:
COPY \B\BUHAHHA \TEMP\
So, I need the \B\ from the first letter of BUHAHHA