delete files from network share
See original GitHub issueI was using grunt quite happely when I stumbled upon an issue in removing files from a network location with grunt-contrib-clean
So I just tried del in combination with gulp but ended having (at first glance) the same issue. I’m new to gulp so maybe i’m missing something. This is my extremely simple gulpfile.js
var gulp = require('gulp'),
del = require('del');
gulp.task('clean', function(cb) {
del(['//some/network/location/*'], { force: true }, cb)
});
gulp.task('default', function() {
gulp.start('clean');
});
Running gulp gives me no errors but the files in //some/network/location are still there. Is this unsupported use, misuse or a bug?
I’m running gulp on a Windows 8 machine from within Git bash. Shared location is on my synology NAS.
Issue Analytics
- State:
- Created 8 years ago
- Comments:10
Top Results From Across the Web
Faster way to delete files on a network drive - Super User
Open the Start Menu and in the text box, type cmd.exe and hit Enter (or open the command prompt using your preferred method);...
Read more >How to delete a mapped network drive from Windows (5 ways)
To remove a drive mapping towards a network folder or FTP site, select it and press Delete on your keyboard. Alternatively, you could...
Read more >Where Do Files Go When Deleted From a Network Shared ...
With Undelete Server, files deleted from network shares are saved in a Recovery Bin. So, you really can delete a file from the...
Read more >Can't delete files on NTFS file system - Windows Server
This article describes why can't delete a file or a folder on an NTFS file system volume. It also provides help to solve...
Read more >Windows 10 user cannot delete file/folder on mapped network ...
The issues is, User03 cannot delete a folder of file. A pop up window comes up with a file is in use etc....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I am here too …issues on shared drive requires the force option…here is my code
I was using vinylPaths as I wanted to do this on a stream of ONLY changed files
ATM,
globdoes not support UNC globs, see https://github.com/isaacs/node-glob/issues/74 and https://github.com/isaacs/node-glob/pull/146. Thus, this also applies todel.However there’s a workaround:
rootoption: The place where patterns starting with/will be mounted onto./.forceoption: Allow deleting the current working directory and outside.Example:
Notes:
globbing ComputerNames is not possible – Windows processes these in a different way
globbing SharedFolders is not possible – Windows processes these in a different way
Promises fail silently, i. e. to output error message one need to catch it:
Of course,
gulpoutputs errors, but only if one return the Promise:This should answer all questions.