Hello everybody!
I try to write a Batch script,...
but until now i have no glou about Loops,...
This script should do:
1. write what the user enters into a variable %copyname%
(this has to be the path of a txt -data with symbols, letters and numbers AND spaces wich are isolated by ";"
2. write what the user enters into a variable %pathoriginal%
(a path where the original data is (one data like C:\Users\anybody\desktop\Picture.jpg)
3. write what the user enters into a variable %pathcopy%
(a path where the copied data should land (one Folder like C:\Users\anybody\desktop\manypictures-of-the-same))
now it beginn to get tricky,...
4. a Loop should Count the ";" in the txt data
5. a Loop should take one letter/number/etc. and writte it into a variable (also spaces)
6. add one more into the varialble until the readout is the ";"
7. now it should take the original data and copy it into the Folder what the user told ,...
8. and rename it into the readout Name (without the ";")
9. now it should add +1 to the Trigger so the next Name is going to get readout
10. repeat until it is the last ";"
in the end I want 1 data to get x times copied and renamed into what i want(what i want is in the txt data)
so im new in batching ,... begann to learn a Little bit yesterday would be very nice if one could help me, aaaaaand for the future,... does anybody know good Sites for tutorials in Batching?
and sorry for my bad english!!!
Thanks a lot!
your Mr.Crie
P.s.: the txt data Looks like "BO 123MX5-J5X;FO LIC-2016-02;ZY C5A-77 5533;" These are 3 names but normal are like 300 names,...
special batch data needed for COPY and REN
Moderator: DosItHelp
-
- Posts: 240
- Joined: 04 Mar 2014 11:14
- Location: germany
Re: special batch data needed for COPY and REN
Hallo,
Have you dressed up a beginning with the batch? What do you have till present?
Phil
Have you dressed up a beginning with the batch? What do you have till present?
Phil
Re: special batch data needed for COPY and REN
pieh-ejdsch wrote:Hallo,
Have you dressed up a beginning with the batch? What do you have till present?
Phil
not very much,...
Code: Select all
@echo off
:beginning
echo path of the .txt data
set /P pfadnamensdatei=
pause
echo path of the originaldata (.jpg or . pdf)
set /P pfadoriginaldatei=
pause
echo path of the target folder
set /P pfadkopiedatei
pause
*insert LOOP here
where %kopiedateiname% should be one of the names in the txt data,
found at %pfadnamensdatei%*
:copy
COPY %pfadoriginaldatei% %pfadkopiedatei%
CD %pfadkopiedatei%
REN %originaldateiname% %kopiedateiname%
echo Finished?
echo [y]es, [n]o
set /P x=
if %x%=="y" goto end
if %x%=="n" goto beginning
pause
:end
exit
It´s realy not much, and i guess i have some Errors in it,... like i said, first time i tried, i´m sorry
Re: special batch data needed for COPY and REN
If the paths being used are using characters from a non-english/latin language, then the solution may be different.
Re: special batch data needed for COPY and REN
foxidrive wrote:If the paths being used are using characters from a non-english/latin language, then the solution may be different.
maybe but i have o idea how to do the loop,...
even i don´t know the command for reading out a .txt data
or how to set a trigger ,...