473,386 Members | 1,733 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,386 software developers and data experts.

Script to Update Multiple Files in a Directory

I need a script to process all of the files in a directory (and
sub-directories). Nearly all of the .ASX files have an out-of-date
Copyright date.

Example:

<ASX version = "3.0">
<TITLE>Hello World</TITLE>
<ENTRY>
<AUTHOR>Me</AUTHOR>
<COPYRIGHT>Copyright © 1995-2000 Me, Inc.</COPYRIGHT>
</ENTRY>
</ASX>

The <COPYRIGHTtag needs to be updated to be -2006. Each file is
different. Some may have 2000, others may have 2001, etc. The opening
date could be 1995, or something else. Those need to stay whatever they
were in the file. ONLY change the "to" date.

For this, the script has to take the whole set of ASX files, update
them.

Nov 2 '06 #1
1 1583
rh****@gmail.com said the following on 11/2/2006 4:16 PM:
I need a script to process all of the files in a directory (and
sub-directories). Nearly all of the .ASX files have an out-of-date
Copyright date.

Example:

<ASX version = "3.0">
<TITLE>Hello World</TITLE>
<ENTRY>
<AUTHOR>Me</AUTHOR>
<COPYRIGHT>Copyright © 1995-2000 Me, Inc.</COPYRIGHT>
</ENTRY>
</ASX>

The <COPYRIGHTtag needs to be updated to be -2006. Each file is
different. Some may have 2000, others may have 2001, etc. The opening
date could be 1995, or something else. Those need to stay whatever they
were in the file. ONLY change the "to" date.

For this, the script has to take the whole set of ASX files, update
them.
Download Notetab: <URL: http://www.notetab.com/Then open all your ASX
files (Notetab, when you do File>Open you can open *.ASX and it will
open them all at once). Then do a global search/replace and replace them
all. Then save them all. No Javascript needed. And, client side script
can't modify server side files.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Sticks | last post by:
ok... im not quite sure how to describe my problem. i have a php script that runs through my entire php site and writes the resulting output to html files. this is necessary as the nature of the...
5
by: Shalen chhabra | last post by:
Hey, Can anyone give me a snippet for running a python program over all the files in the directory. For ex: I have ten files in a directory and I want to run a python program against all of...
10
by: shumaker | last post by:
I don't need a detailed description of a solution(although I wouldn't mind), but I am hoping someone could tell me in general the best path to go about accomplishing a task, since I don't know all...
1
lwwhite
by: lwwhite | last post by:
I'm using Access 2003, Win XP. I want to update a table with the contents of a directory and subdirectories. I have a directory structure like this: FolderA Subfolder1 Subfolder2 ...
7
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file"...
5
by: BF | last post by:
Hi, I have a problem: I am writing an update script for a database and want to check for the version and Goto the wright update script. So I read the version from a table and if it match I...
3
by: David | last post by:
On Sun, May 4, 2008 at 4:43 AM, lev <levlozhkin@gmail.comwrote: Hi, I started tidying up the script a bit, but there are some parts I don't understand or look buggy. So I'm forwarding you the...
0
by: Clay Hobbs | last post by:
On Fri, 2008-08-01 at 14:41 -0700, Zach Hobesh wrote: You could just give the script and the module to the other people who use your script, and tell them to put the files in the same directory....
3
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.