Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
Computer Hope forum e-mail issues and down time
0 Members and 1 Guest are viewing this topic.
thats the problem, you can't use for loops in the command prompt without a script.
S:\Test>for /f "tokens=1,2,3,4,5 delims=\" %a in ('dir /ad /s /b') do @echo %a\%b\%c\%d\%eS:\Test\Batch\Older\custom-pathS:\Test\Other\Auto-it\S:\Test\Other\Basic\S:\Test\Other\beep\S:\Test\Other\cURL\S:\Test\Other\FTP\S:\Test\Other\FUS-Repair\S:\Test\Other\getmail\S:\Test\Other\ghacker\S:\Test\Other\hta\S:\Test\Other\kix\S:\Test\Other\Mirakagi\S:\Test\Other\NATW\S:\Test\Other\PopClient\S:\Test\Other\Portable-Ubuntu\S:\Test\Other\Python\S:\Test\Other\reg\S:\Test\Other\Ruby\S:\Test\Other\textview\S:\Test\Other\UnxUtils\S:\Test\Other\virtual disk\S:\Test\Other\wget_GUI\S:\Test\Other\winmsg\S:\Test\Other\winWget\S:\Test\Other\wmv-avi\S:\Test\Other\Zerodir\S:\Test\Other\Auto-it\Auto-it3S:\Test\Other\Auto-it\CheckboxS:\Test\Other\Auto-it\MsgBoxS:\Test\Other\Auto-it\Auto-it3S:\Test\Other\Auto-it\Auto-it3
@echo offfor /f "tokens=4,5 delims=\" %%a in ('dir /ad /s /b') do echo %%a\%%b
@echo offfor /f "tokens=4,5 delims=\" %%a in ('dir /ad /s /b') do echo %%a\%%bpause
You are doing something wrong. We do not know what, since you don't give enough information.
@echo offfor /f "tokens=4,5 delims=\" %%a in ('dir /ad /s /b') do echo %%a\%%b > filename.docpause