Search found 2 matches
- 20 Oct 2011 22:57
- Forum: DOS Batch Forum
- Topic: Filenames or foldername with spaces issue in a FOR loop
- Replies: 3
- Views: 3715
Re: Filenames or foldername with spaces issue in a FOR loop
Thank you very much, Dave. That was very helpful. I tried all the 3 option you provided. The first 2 worked, but the last one didn't. Also, I went thru' the HELP for FOR, and tried using the backquotes too, and that worked. for /f "usebackq delims==" %%J in (`dir /A-D /S /B H:\Script\test\...
- 20 Oct 2011 21:29
- Forum: DOS Batch Forum
- Topic: Filenames or foldername with spaces issue in a FOR loop
- Replies: 3
- Views: 3715
Filenames or foldername with spaces issue in a FOR loop
In a batch script, I am trying to return a directory listing of all files recursively in a folder, but the files or folders with spaces get truncated. Here's the code I am trying out: @echo off SETLOCAL ENABLEEXTENSIONS SETLOCAL DISABLEDELAYEDEXPANSION for /f %%J in ('"dir /A-D /S /B H:\Script\...