Eric Green
Eric Green

Reputation: 7735

files still showing in finder after file.remove()

file.remove() deletes my files, but they still appear in finder. Am I doing something wrong?

Some test code from this SO question:

file.create(file.path(
  "temp/", 
  paste("test", 1:5, "txt", sep = ".")
))

file.remove(dir(  
  "temp/", 
  pattern = "^test\\.[0-9]\\.txt$", 
  full.names = TRUE
))

After deleting: enter image description here

Confirming deleted: enter image description here

#sessionInfo()
#R version 3.0.2 (2013-09-25)
#Platform: x86_64-apple-darwin10.8.0 (64-bit)

Upvotes: 0

Views: 388

Answers (1)

Eric Green
Eric Green

Reputation: 7735

from @Carl Witthoft: Try this trick: change the display from List to Icons and back again (in the Finder window) and see if the deleted files are still there.

Upvotes: 1

Related Questions