how to create an echo when there is a header location

I want to display an echo when a file is deleted. For deleting files in a folder i use this loop: if (isset($_GET['delete'])) { // if is directory -> remove dir if(is_dir($_GET['delete'])){ removeDirectory($_GET['delete']); } // else (must be a file)

alternatives to the long-term `find` command in unix

I want to delete files that are older than 7 days, and I'm using this command to do so: find /directory -mtime +7 -exec rm -f {} \; It is working fine except it takes too long. Is there any other way to delete files older than 7 days, e.g. without us

Bash script for deleting duplicate files

Im new to bash scripting but I believe it would be the best way to delete duplicate image files in a given directory with names such as follows: IMG_151.jpg IMG_151 2.jpg IMG_151 3.jpg IMG_152.jpg IMG_152 2.jpg IMG_152 3.jpg .... In other words, I wo

Need to add a whitelist to my .bat

So I have a .bat that deletes a certain extension, but I need to whitelist a few of them. I'm not having much luck. xcopy "universe" "C:\Users\Administrator\Desktop\Backup\universe - %stamp%" /I for %%i in ("universe\*.world"

Deleting files via Inode in multiple directories

For a project in my linux class we are required to search through one directory to find the inodes to remove, then remove them, as well as every file that they have been hard linked to in three other directories, while some of my classmates wrote dow

Delete the cache image in phonegap

I'm currently developing app for android using Phonegap technology, for your information, my app concept as below Capture image (by default Phonegap will store cache image locally: i.e the image path is (file://androidappnames/cache/21323213.jpg) Ret

Deleting an FTP file in C #

My program can upload files into a ftp server using this code: WebClient Client = new WebClient(); Client.Credentials = new System.Net.NetworkCredential(ftpUsername, ftpPassword); Client.BaseAddress = ftpServer; Client.UploadFile(fileToUpload, WebReq

Windows CMD Find and delete the file by name

I have a website dump which has about half a gig worth of images which have been converted to various file sizes. The structure goes like: media/ 1/ 1.original.jpg 1.large.jpg 1.medium.jpg 1.small.jpg 2/ 2.original.jpg 2.large.jpg 2.medium.jpg 2.smal

Batch file that stores the last 7 files in a folder

Can anyone help me create a batch file? Basically, my goal is to create a batch file that will keep the LATEST 7 .txt files (in other words, the newest) in the folder and subsequently delete the rest. That's IF there are more than 7 files in the fold

Delete a non empty directory

rmdir("./uploads/temp/".$user."/"); I have many files in a directory I wish to remove in my PHP script, however these is no way for me to unlink() the file first. Is there a way I co do unlink(* FROM (dir=)) // don't downvote the long

Secure erasure of a directory

I know how to wipe a file in C# including it's sectors and such. But how do I overwrite the directories themselves? Example: @"C:\mydirectory\" must be unrecoverable gone forever (all files insides are already wiped) so that it will be impossibl

Broken stream detection in python when the file is deleted

My problem is that logging stops for a python program when the log is rotated. I have tracked it down to the stream itself. I don't see any way to tell if the stream is broken from python. After the file is deleted it still accepts writes without any

Linux removal file with size 0

This question already has an answer here: How to delete many 0 byte files in linux? 9 answers How do I delete a certain file in linux if its size is 0. I want to execute this in an crontab without any extra script. l filename.file | grep 5th-tab | no

Deleting files in a higher directory

I'm having problems deleting a file from a higher directory, I found this post and tried it but no luck....: gotdalife at gmail dot com 25-Sep-2008 02:04 To anyone who's had a problem with the permissions denied error, it's sometimes caused when you

PHP deletes the contents of a directory

How do I do that? Is there any method provided by kohana 3?To delete a directory and all this content, you'll have to write some recursive deletion function -- or use one that already exists. You can find some examples in the user's notes on the docu

Tortoisesvn Repo-Browser

I was wondering if I right click on a file in the SVN repo browser, does it get permanently deleted? can it be recovered?This question/answer from the SVN FAQ might interest you : How do I completely remove a file from the repository's history? There

DeleteFile fails on the recently closed file

I have a single threaded program (C++, Win32, NTFS) which first creates a quite long temporary file, closes it, opens for read, reads, closes again and tries to delete using DeleteFile(). Usually it goes smoothly, but sometimes DeleteFile() fails, an