sindresorhus / del

Delete files and directories
MIT License
1.33k stars 66 forks source link

It still delete the file without extension although have ! at begin #123

Open thinhbgnex opened 4 years ago

thinhbgnex commented 4 years ago

Example files tree

files
  subDir
    folder1
      child1.txt
    folder2
    file1 //this is a file without extension
    file2.txt

command

del(['./files/subDir/**', '!./files/subDir/file1']

Result: all files in folder files were deleted.

Expected after deletion:

files
  subDir
    file1
vladshcherbin commented 4 years ago

@thinhbgnex try using ./files/subDir/* instead.