Skip to content

filespec does not work as expected #5

@ajweber

Description

@ajweber

I have a number of top-level directories that are auto-created by a piece of software that apparently has a bug, because it does not clean them up and it makes sub-folder paths that are way over MAX_PATH length. These are all named according to the following "pattern": "C:\Temp_#+" In other words, the directory is made in the root of the C-drive, it's prefixed with the word "Temp", followed by an underscore, and a number (could be any number of digits, but at least one digit).

So I tried using DeleteFiles with an absolute path/filespec as follows:
DeleteFiles.exe c:\Temp_?* -r -f -l
This attempts to delete files and folders that are way different than what I would expect that filespec to cover. In fact, it's very dangerously traversing into the Windows directories, User directories, etc. Please see the output from that exact syntax from my server (attached, below).

If you look at the following directory listing (using the same filespec), you'll see what I expected to get purged by the program:
C:>dir c:\Temp_?*
Volume in drive C is SystemDisk
Volume Serial Number is 24AA-6D75

Directory of C:\

02/22/2017 08:53 AM

Temp_1234
02/22/2017 08:53 AM Temp_34
0 File(s) 0 bytes

test.txt

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions