A
A
Alice7772017-09-19 12:32:55
cmd/bat
Alice777, 2017-09-19 12:32:55

How to implement a vertical progress bar for a specific HTML section?

Not working, but a sketch rendered as a progress bar for an entire HTML page jsfiddle.net/wmDLu/16

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Konstantin Tsvetkov, 2019-06-03
@povidlove

When called , %1 gets test.cmd "жжжж цццц.txt" C:\Temp\-2into the file ~Xcopy.Tmpalong with quotes, but for xcopyit it needs to be without quotes .

@Echo Off
If '%2==' GoTo :Eof
setlocal DisableDelayedExpansion
set "file=%~1"
setlocal EnableDelayedExpansion
echo !file!>~Xcopy.Tmp
xcopy *.txt %2\ /D /Y /Exclude:~Xcopy.Tmp
If Not %ErrorLevel%==0 (
   Echo Ошибка при копировании
   Pause
   GoTo :Eof 
)
del ~Xcopy.Tmp

Addition:
The above removal of quotes from the input parameter is universal. And for files there is a more interesting way: . Which allows wildcards (* and ?) to be used.DIR /B %1 > ~Xcopy.Tmp
It was
Не удалять файл исключения (он всё равно перезаписывается) и проверить правильность.
И попробовать для него абсолютный путь %CD%\~Xcopy.Tmp.

S
slavius, 2019-06-04
​​@slavius

Overwriting all files is wrong.
EXCLUDE accepts a file with a list of files. It is necessary either to output the received name to a file and use it already.
Or you need to iterate over all files and check the file name before copying
for %%f in (path\*.txt) do (
If not %%f==%1 xcopy %%f %2\ /D /Y
If Not %ErrorLevel% ==0 (
Echo Error while copying
Pause
GoTo :Eof
)

V
Vadim, 2017-09-21
@de_arnst

Something like jsfiddle.net/z1fs74w9 ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question