WAD 0 Files Deleted

samintz

Scott Mintz
May 20, 2008
1,503
16
Solon, OH, USA
I have a script that contains (among other things) the following lines:
Code:
iff '%3' == 'clean' then
    del /se *.obj;*.d;*.lib;*.lis;*Results.xml
        pause
endiff

However, I get inconsistent results when I run the script. I ran it three times in a row and got the "0 files deleted" message. Then I ran it in bdebugger and it deleted over 9000 files. Then again at the prompt with the following results. You can ignore the "4 failed" as that is expected since those are read-only files.

Code:
[R:\LogixTests\UnitTests] Build.btm Solutions.xml ReleasePC Clean
     0 files deleted
Press any key when ready...^C
 
[R:\LogixTests\UnitTests] Build Solutions.xml ReleasePC Clean
Deleting R:\LogixTests\UnitTests\CmTests\SQLite\sqlite3.lib
Deleting R:\LogixTests\UnitTests\InstructionSet\FbImcTests\TuningTest\ProgOperTestRunResults.xml
Deleting R:\LogixTests\UnitTests\IoTests\Tools\dtl32\DebugPC\dtl32.lib
Deleting R:\LogixTests\UnitTests\IoTests\Tools\dtl32\ReleasePC\dtl32.lib
     0 files deleted       4 failed
Press any key when ready...^C
 
[R:\LogixTests\UnitTests] Build.btm Solutions.xml ReleasePC Clean
Deleting R:\LogixTests\UnitTests\CmTests\SQLite\sqlite3.lib
Deleting R:\LogixTests\UnitTests\InstructionSet\FbImcTests\TuningTest\ProgOperTestRunResults.xml
Deleting R:\LogixTests\UnitTests\IoTests\Tools\dtl32\DebugPC\dtl32.lib
Deleting R:\LogixTests\UnitTests\IoTests\Tools\dtl32\ReleasePC\dtl32.lib
     0 files deleted       4 failed
Press any key when ready...^C

Any idea what's going on?
-Scott
 
Aug 2, 2011
258
4
Berlin, Germany
can you see any errors if you omit the "/E" ?
 

samintz

Scott Mintz
May 20, 2008
1,503
16
Solon, OH, USA
You're not providing a path -- are you sure that when you ran it in the debugger you were starting in the same path?

Do you have any other processes on the system that are creating these files?
Unless BDEBUGGER changes the CWD, then it was the same.

Essentiallly, I ran my batch script like this:

build.btm Solutions.xml ReleasePC Clean

And then pre-pended bdebugger to the command line and ran it again.

The build itself parses the XML file to know which solutions to build and then builds them invoking devstudio to do the build. The build output consists of all those file types. The ones that cause the most grief are the .d files which are dependency files. When files in a project change and the old dependency files stay around the build will complain about not being able to build something or other. So in order to insure a clean build I want to delete all the .d files and while I'm at it delete all the object files, libraries and sundry files used in the build.

I've never had the DEL command fail when I issue it at the command prompt. It only seems to fail when run from this batch file.
 

Attachments

  • Build.btm
    2.2 KB · Views: 51

rconn

Administrator
Staff member
May 14, 2008
12,344
149
Unless BDEBUGGER changes the CWD, then it was the same.

BDEBUGGER starts a new session (IDE.EXE) and a new parser, so unless you've configured TCC to always start (and stay) in the same directory, it's unlikely it was the same.

I've never had the DEL command fail when I issue it at the command prompt. It only seems to fail when run from this batch file.

DEL doesn't know anything about batch files, and there will be no difference as far as TCC & DEL are concerned between the command line and a batch file.
 

samintz

Scott Mintz
May 20, 2008
1,503
16
Solon, OH, USA
BDEBUGGER starts a new session (IDE.EXE) and a new parser, so unless you've configured TCC to always start (and stay) in the same directory, it's unlikely it was the same.
It deleted the correct files. I was on drive R: and TCMD is installed in C:\TC13.

My TCSTART file contains: if %_pipe != 0 .or. %_transient != 0 .or. %_ide != 0 quit

So no special code or directory changes are being done in TCSTART. The first time I encountered this behavior I was surprised there were no files deleted. That's why I added the PROMPT after the delete.
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
I think it is extremely unlikely you're seeing a DEL bug (which would affect a few hundred thousand users, not one). I tried your batch file, but I was unable to make it misbehave. (Though you really should correct your invalid "/se" syntax.)

If you can create a reproducible failcase I'll be happy to look at it; but there's not much I can do with anecdotal bugs.
 
Similar threads
Thread starter Title Forum Replies Date
vefatica FFIND, temp files? ... not deleted? Support 0
vefatica Tmp files from in-process pipes not deleted Support 6
MickeyF TCC crashing when copying multiple files (now resolved) Support 6
fpefpe How to? shortcuts and batch files Support 4
C v28 key files Support 2
J ffind does not find files Support 4
C duplicate files in multiple plugin sites Support 9
Dmitry L. Kobyakov Fixed The SETARRAY /R command works incorrectly with cyrillic files Support 2
S How to? Deinstalling TC/reinstating execution of bat files by cmd in Win7 Support 31
R FUNCTION to count NUMBER of files matching a pattern and specific length/not length Support 4
vefatica Finding files with alternate data streams? Support 4
rps Multi-column DIR /v not displaying all files. Support 5
D How to skip files in a fileset? Support 6
vefatica PIPEVIEW leaves TMP files Support 18
K "copy /z /w" command not deleting read-only files in destination Support 10
Jesse Heines "Taken" date for JPG and PNG files Support 4
O I cannot use links to .btm files Support 5
C How to? rename files with spaces Support 8
R How to? Append files in multiple subfolders using copy? Support 8
Joe Caverly "Functions" in cmd.exe batch files Support 6
S Batch files Calling Batch Files Support 2
vefatica Find Files/Text dialog: does it work? Support 0
Joe Caverly UNZIPping older .ZIP files Support 3
C Documentation default location for LOG files Support 21
P exit /b in batch files Support 7
P Labels in batch files: TCC vs CMD.exe Support 9
M ANSI is used to show files instead of OEM in version 17 to 19 ! Support 5
C 7Z files on forum? Support 0
x13 Problem listing repository files using DIR http(s)://... Support 8
B Can copy command concatenate multiple mp3 files Support 2
redwdc Copying files with spaces, commas, etc. Support 5
J New lexer for TCC batch files. Support 0
M How to? want to download a file from a website enumarate the links and download the files Support 2
keithg1964 TCC RT Install Files Support 1
P Fixed Rexx .cmd files no longer work in TCC 20 Support 3
thorntonpg Handling files with embedded spaces Support 1
WavSlave Fixed Unable to sort files by description in TCC v19 Support 2
P Files older - exist Support 1
D safe delete files command Support 10
P Copying files in subdirectories Support 9
C WAD VIEW print multiple files - switches fail Support 10
MikeBaas How to? SELECT: exclude files / display prompt Support 2
Phileosophos WAD Can't rename files in subfolders Support 1
nickles WAD del unable to delete files ending in "." Support 18
P Rename files with ampersand in the name Support 1
C Touch command — I Need to touch matching files in another directory. Support 5
S iftp copying pgp files from ftp is not working Support 11
M Fixed Cannot use the "Browse..." function in "Find files/text" dialogbox Support 2
fromano How to? Everything finding directories with 2 or more files in them Support 3
vefatica Empty .watch files saved Support 0

Similar threads