Search found 6 matches

by daviaujp
2023-Dec-07, 3:46 pm
Forum: Windows CMD Shell
Topic: file not erased
Replies: 7
Views: 3459

Re: file not erased

In batch file

Code: Select all

for /f "tokens=1,2 delims=." %%I in ('dir /B/O:G  *.mp4')  do if EXIST "%%I".mp4  del /Q "%%I".mkv
by daviaujp
2023-Dec-07, 2:07 am
Forum: Windows CMD Shell
Topic: file not erased
Replies: 7
Views: 3459

Re: file not erased

Yes!

Thank you very much. :-)

JPD
by daviaujp
2023-Dec-06, 8:52 pm
Forum: Windows CMD Shell
Topic: file not erased
Replies: 7
Views: 3459

Re: file not erased

C:\Users\PC\Videos\Movavi Library>for /f "tokens=1,2 delims=." %I in ('dir /B/O:G *.mp4') do if EXIST %I del /Q "%I.mkv" && echo %errorlevel% C:\Users\PC\Videos\Movavi Library>if EXIST jupe tututeen del /Q "jupe tututeen.mkv" && echo 0 C:\Users\PC\Video...
by daviaujp
2023-Dec-06, 4:08 pm
Forum: Windows CMD Shell
Topic: file not erased
Replies: 7
Views: 3459

Re: file not erased

Robocopy.cmd ......................... :: robocopy "C:\ZZ COURS" "D:\ZZ COURS" /S /FP /NJH /NS /NDL /XX /XO /R:2 /IT PUSHD "C:\Users\PC\Videos\Movavi Library" for /f "tokens=1,2 delims=." %I in ('dir /B/O:G *.mp4') do if EXIST %I del /Q %I.mkv robocopy "C...
by daviaujp
2023-Dec-05, 5:11 pm
Forum: Windows CMD Shell
Topic: file not erased
Replies: 7
Views: 3459

file not erased

Hi,

test.cmd


for /f "tokens=1,2 delims=." %I in ('dir /B/O:G *.mp4') do if EXIST %I del %I.mkv

>if EXIST jupe tututeen del jupe tututeen.mkv

The file is not erased even if I use quotes. "jupe tututeen.mkv"REgards,

JPD
by daviaujp
2023-Nov-27, 10:13 am
Forum: Windows CMD Shell
Topic: 8.3 filename short and windows 11
Replies: 1
Views: 4818

8.3 filename short and windows 11

Hi, Ref: "NtfsDisable8dot3NameCreation"=dword:00000002 "Win31FileSystem"=dword:00000000 ::tst.cmd averylongfilename.txt :: echo short filename= %~sn1 echo short filename= %~sf1 echo short file extension= %~sx1 short filename= averylongfilename short filename= C:\Users\PC\Desktop\...