Search found 6 matches

by OptimalDesigns
16 Dec 2015 11:44
Forum: DOS Batch Forum
Topic: How to capture a subdirectory's short subdirectory's name?
Replies: 1
Views: 1923

How to capture a subdirectory's short subdirectory's name?

In a batch file, I'm trying to capture the short subdirectory name. The long name is in the variable %FCdir%. The following have been tried: for %%I in ( %FCdir% ) do (set FCdir=%%~sI) FOR %%A IN ("%FCdir%") DO ECHO %%~sA FOR /d /r . %%d IN (%FCdir%) DO echo ... %%~sd For testing, set FCdi...
by OptimalDesigns
02 Dec 2014 18:20
Forum: DOS Batch Forum
Topic: Batch file in question ... sometimes it works! FileSize key
Replies: 10
Views: 4995

Re: Batch file in question ... sometimes it works! FileSize

i don't know the conditions, so i marked them with question marks, changed it a bit, no errors, i assume this does the same as yours, hope it helps.. for %%? in ( "scrout" ) do if exist %%? ( :: for /r %%? in ( "%%~?" ) do if %%~z? gtr 400 ( :: Still giving me problems ... chang...
by OptimalDesigns
26 Nov 2014 16:07
Forum: DOS Batch Forum
Topic: Batch file in question ... sometimes it works! FileSize key
Replies: 10
Views: 4995

Re: Batch file in question ... sometimes it works! FileSize

i don't know the conditions, so i marked them with question marks, changed it a bit, no errors, i assume this does the same as yours, hope it helps.. for %%? in ( "scrout" ) do if exist %%? ( :: for /r %%? in ( "%%~?" ) do if %%~z? gtr 400 ( :: With this change that you recommen...
by OptimalDesigns
22 Nov 2014 12:39
Forum: DOS Batch Forum
Topic: Batch file in question ... sometimes it works! FileSize key
Replies: 10
Views: 4995

Re: Batch file in question ... sometimes it works! FileSize

Moved set mask=... outside ( ... It seems to work ... %a still their, why? are they okay? E:\Tools.vb\FC-Compiler\demos\ODEs-ivp>set mask=scrout E:\Tools.vb\FC-Compiler\demos\ODEs-ivp>if not exist output\nul mkdir output E:\Tools.vb\FC-Compiler\demos\ODEs-ivp>if exist scrout ( for /R %a in (scrout) ...
by OptimalDesigns
22 Nov 2014 12:10
Forum: DOS Batch Forum
Topic: Batch file in question ... sometimes it works! FileSize key
Replies: 10
Views: 4995

Re: Batch file in question ... sometimes it works! FileSize

This may show part of problem, but why does it not get to the if statement? E:\Tools.vb\FC-Compiler\demos\ODEs-ivp>rem set f-out=E:\Tools.vb\FC-Compiler\... \output\Beam.out E:\Tools.vb\FC-Compiler\demos\ODEs-ivp>if not exist output\nul mkdir output E:\Tools.vb\FC-Compiler\demos\ODEs-ivp>if exist sc...
by OptimalDesigns
22 Nov 2014 08:47
Forum: DOS Batch Forum
Topic: Batch file in question ... sometimes it works! FileSize key
Replies: 10
Views: 4995

Batch file in question ... sometimes it works! FileSize key

Output\Beam.out file does NOT exist after a run. Turned on ECHO and got following response. E:\Tools.vb\FC-Compiler\demos\ODEs-ivp>if not exist output\nul mkdir output E:\Tools.vb\FC-Compiler\demos\ODEs-ivp>if exist scrout ( set mask=scrout [b]for /R %a in ((null)) do (if %~za GTR 400 ([/b] rem Some...