RE: delete old files with a batch script hmm RE: delete old files with a batch script is it not possible to have a script which should work for 2 different conditions? Red Flag This Post Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework. The Tek-Tips staff will check this out and take appropriate action.
Click Here to join Tek-Tips and talk with other members! Already a Member? Join your peers on the Internet's largest technical computer professional community. It's easy to join and it's free. Register now while it's still free! Already a member? Show Posts. Shell Programming and Scripting. Need script to delete old files. Registered User.
Join Date: Aug Hi, I need a script to delete files older than 2 years or a year. I have around hundreds of old files which needs to be deleted. Could you please help. Code :. Join Date: Nov Try something like this Code :. Hi My directory structure is as below. Script to SFTP files then delete them. Hi, I want to create a script. Files delete script. Friends, I had written a small script to delete files from deletefiles.
However, I want to add one more piece to script, so as to check if the file file abc which was already deleted earlier exists in 'deletefiles. I have around hundreds of old files which needs to be deleted. Could you please help. Need help creating a script to FTP files to a server and then delete the files that were transfered.
I have setup the file transfer with no problems but am having problem deleting those files from the Linux box. My current non-working solution is below. Any ideas, anyone?? Script to delete files. I have a local linux machine in which the files are dumped by a remote ubuntu server.
If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell I have directories named: 0 - which should contain files named 0 - But some of these directories contain file whose names are greater than and I need to delete those.
I wrote the script below but that doesnt work. Any ideas? RedHat Commands. OpenSolaris Commands. Linux Commands. SunOS Commands. FreeBSD Commands.
0コメント