473,385 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Delete specific files using Command Scripting

36
I have lots of files that need monthly cleanup done on them. These files are located in many different directories on the same server. Some example files names are C1234.idx, C1111.idx, C8693.idx, etc....ALL the files will start with either an 'C' or an 'L' and then contain 4 random numbers followed by an extension of either .idx, or .dat. The problem is that there are also files named CTFIX.idx, Ctons.idx, etc...So I can not use:

Expand|Select|Wrap|Line Numbers
  1. DEL ServerName\PathName\C????.idx 
as then all files that are 5 characters in length starting with C will be deleted and I only want to delete files that start with C and have numbers following.

Expand|Select|Wrap|Line Numbers
  1. DEL ServerName\PathName\C****.idx  
as then all the files starting with C will be deleted.

Is there anyway to delete specific files that point just to numeric characters? If not, does anyone have any suggestions on how I may go about deleting these files using another language?

Thank you in advance!!!

Amy
Apr 14 '10 #1
0 1237

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Ben | last post by:
Greetings, I am looking for a way to search for and delete files based on a pattern mask. For example, the search method would find all files matching a certain pattern containing wildcards (e.g....
5
by: Raj | last post by:
Hi all, Can anyone help me with a script which would delete files or move them to a different folder at some scheduled time..! Please.....!!! Thanks in advance...
4
by: Jeffrey | last post by:
Is there an easy way to delete all files in a directory (i.e., without explicitly looping through all file names and individuall deleting each file)? Thanks
0
by: Arjan van den Noort | last post by:
How to delete a directory (with all containing directories and files) with vb.net if the directory contains long paths ? (just like the dos command: RD /S/Q path) What I want is a routine to...
3
by: Parag Gaikwad | last post by:
Hi, I need to delete files across the network using web client (IE 6.x) in Win 2003 - IIS 6.0 environment. Can someone please suggest an approach I can use to acheive this. Will using FSO do...
10
by: | last post by:
I'm fairly new to ASP and must admit its proving a lot more unnecessarily complicated than the other languages I know. I feel this is because there aren't many good official resources out there to...
22
by: Cylix | last post by:
I have a 4row x 1col table, I would like to drop all the content of row three. Since Mac IE5.2 does not suppport deleteRow method, I have also try to set the innerHTML=''; but it does not work. ...
24
by: biganthony via AccessMonster.com | last post by:
Hi, I have the following code to select a folder and then delete it. I keep getting a Path/File error on the line that deletes the actual folder. The line before that line deletes the files in...
4
by: viper888 | last post by:
Hi to all, I'm the newly appointed network administrator in our office, and upon scanning all the PCs that are connected to the network, (by the way we're using a windows 2000 server) almost all...
1
by: achotto | last post by:
hi, i try to upload a multiple image files. after that i will rename the files name. the problem is when i upload a 2 or more same files name exp-goal.jpg, it will return "files already exist". ok...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.