Search found 3 matches

by ipso
15 Dec 2014 15:14
Forum: DOS Batch Forum
Topic: Working with a mapped directory
Replies: 8
Views: 6227

Re: Working with a mapped directory

You are saying that the directory listing is not outputting the same for the two different FOR commands? If so then just try forcing it to do so. for /f "delims=" %%a in ('dir /a-d /b /on *.*') do set /A i+=1 & set alpha[!i!]=%%a & set gamma[!i!]=%%~na for /F "delims=" %...
by ipso
15 Dec 2014 14:58
Forum: DOS Batch Forum
Topic: Working with a mapped directory
Replies: 8
Views: 6227

Re: Working with a mapped directory

Thanks for reply! Example running in local: D:\MKV Merge>setlocal enabledelayedexpansion D:\MKV Merge>cd /D D:\MKV Merge\ D:\MKV Merge>cd A D:\MKV Merge\A>set i=0 D:\MKV Merge\A>for %a in (*.*) do set /A i+=1 & set alpha[!i!]=%a & set gamm a[!i!]=%~na D:\MKV Merge\A>set /A i+=1 & set alp...
by ipso
15 Dec 2014 12:23
Forum: DOS Batch Forum
Topic: Working with a mapped directory
Replies: 8
Views: 6227

Working with a mapped directory

Hi guys, I'm new working with batch files. I made this script but it only works propperly when is running in a local resource. When it points to a network mapped directory doesn't catch the list in the same order. See script below: ::@echo off setlocal enabledelayedexpansion cd /D %~dp0 cd A set i=0...