Home · Compatibility Lists · Support Forums · FAQ · News Archive · Articles · Submit News/Upcoming News
NT Compatible
advertisement


Forum overview » Software » I need a program that will replace all instances of a file (1/1)

Reply New Poll

I need a program that will replace all instances of a file
Author Message
Christianb
Senior Member


Posts: 759
Joined: 2001-11-10
Member No.: 7704
Icon 2003-01-11 14:50:03

Hi Gang,
I need a program will replace all instances of a file on a drive or drives with a newer version if there is one. Does anyone know of such an app?
Thanks,
Christian Blackburn

Post #118434
Edit Quote Print Solution Plonk Delete
adamvjackson
Senior Member


Posts: 2174
From: Asheville, NC
Joined: 2002-08-26
Member No.: 12643
Icon 2003-01-11 16:07:38

If this is a one-time solution, I would probably recommed just using the Windows search command... Would you need this program to be GUI or CLI based?

Post #118447
Edit Quote Print Solution Plonk Delete
Christianb
Senior Member


Posts: 759
Joined: 2001-11-10
Member No.: 7704
Icon 2003-01-11 16:51:46

Hi Adam,
I shouldn't have, but I've already gone ahead and started writing an application to meet my needs . However since I'm doing a half-ass job I'm still interested in more complete solutions. Also freeware would be preferable.
Thanks,
Christian Blackburn

Post #118451
Edit Quote Print Solution Plonk Delete
jimf43
Senior Member


Posts: 397
Joined: 2001-10-12
Member No.: 7287
Icon 2003-01-11 19:03:11

"Hi Adam,
I shouldn't have, but I've already gone ahead and started writing an application to meet my needs . However since I'm doing a half-ass job I'm still interested in more complete solutions. Also freeware would be preferable.
Thanks,
Christian Blackburn"


I do that all the time with ZTree. No big deal ;-).

Post #118454
Edit Quote Print Solution Plonk Delete
AlecStaar
Account Disabled


Posts: 51
From: A discrete point in the Space-Time continuum...
Joined: 2001-02-09
Member No.: 5224
Icon 2003-01-11 19:53:52

"Hi Adam,
I shouldn't have, but I've already gone ahead and started writing an application to meet my needs . However since I'm doing a half-ass job I'm still interested in more complete solutions. Also freeware would be preferable.
Thanks,
Christian Blackburn"


An exercise in recursive function file calling vectoring thru files & folders... always fun, & fairly hi-tech stuff to write up!


* Have fun, it's good to see that you took the initiative to do it! The ONLY real difference in doing "home-brewed" stuff for yourself vs. putting out something that's not "Half-Assed" as you call it, is really in error checks & making sure it runs from anyplace on a disk etc. or has .ini file or registry values that allow users to customize the app as to saving its size settings, last state of use, & what-not!



(Good to see you are into making your OWN solutions! It's a handy skill to have at times, no doubt about it, as you are your own "plumber" so to speak & save money at times, or come up with unique solutions not provided in "canned/turnkey" software solutions!)

APK

P.S.=> And, neat part is IF you decide to "grow & mature" it fully with all the niceties & what-not is that if you ever have time or the initiative to do all that extra work, you can put it out for others to use as well if it turns out up to your own personal standards of excellence... others might like what you make too and find it useful! apk

Post #118456
Edit Quote Print Solution Plonk Delete
Christianb
Senior Member


Posts: 759
Joined: 2001-11-10
Member No.: 7704
Icon 2003-01-11 23:49:26

Hi AlecStaar,
Ya I thought about triaging the folders, but I have never done that and while I can conceptualize how I didn't feel like putting that much time into it. I do plan on writing such an application, but not yet. Believe it or not even though I've written computer AI and what not, I still really haven't worked with a ListBox that much so I thought I'd play with that. Basically you select what file you want to distribute and which folders you want to put it in. If I feel like it I'll expand from there allow users to back up the older file, have some compilation commands, and allow users to copy single files and or a selection of files and folders, but really I already have a lot more interesting products I'm working on so it'll have to take a back burner. Also I would like to have something that would FTP sets of files and folders via a decent script. I know CuteFTP can, but I don't think they do that great of a job. How'd InnoSetup work out for you? Did you try it yet? Don't feel bad if you haven't some really nice guy from England went to all the trouble to mail me a copy of Delphi 7 and I still haven't used that either . I've just been too busy and I'm really starting to get good at VB so it's hard for me to want to use anything else right now. Oh if you want to play my Checkers game (it's the lame ass bloated windows installer though) go to Checkers.net.

Cheers Amigo,
Christian

Post #118471
Edit Quote Print Solution Plonk Delete
Linuxboy00
Member


Posts: 42
Joined: 2002-04-04
Member No.: 8925
Icon 2003-01-12 05:26:10

You could download Kixtart from www.kixtart.org and use that. I've used it to do many things. It's easy to program in, and has lot's of functions. You will be pleased. YOu can write a program in it that will search for the files and replace it with the newer version based on what your looking for. Like file size, date, last modifed whatever... Take a look and see if it will do what your looking for. FYI, you will have to code your own program but the possibilities are endless with this little beast of a program.

Post #118477
Edit Quote Print Solution Plonk Delete
Christianb
Senior Member


Posts: 759
Joined: 2001-11-10
Member No.: 7704
Icon 2003-01-12 14:03:53

Thanks LinuxBoy I'll take a look at it. Hopefully it works for Windows too.
-Christian

Post #118504
Edit Quote Print Solution Plonk Delete
Christianb
Senior Member


Posts: 759
Joined: 2001-11-10
Member No.: 7704
Icon 2003-01-12 14:07:49

Hi LinuxBoy,
I typically try to make programs that are portable. Without a lot of additional bloat and runtimes. That is why I program in Visual Basic. That was a joke by the way . No seriously I do like to write real standalone programs on my own. I'm sure it's a great scripting language, but I need to know another one of those like I need a hole in my head . I'll just learn to do it via the Windows API and VB. Thanks for sending me the link though, I'll forward it on to some networking friends of mine who would most likely get better use out of it.
Thanks,
Christian

Post #118505
Edit Quote Print Solution Plonk Delete
AlecStaar
Account Disabled


Posts: 51
From: A discrete point in the Space-Time continuum...
Joined: 2001-02-09
Member No.: 5224
Icon 2003-01-12 15:37:03

"Hi AlecStaar,
Ya I thought about triaging the folders, but I have never done that and while I can conceptualize how I didn't feel like putting that much time into it. "


Yes, I understand... time IS the killer commodity. Frustration is another one, building something up from scratch & then fielding bug reports, especially if you put it out for the world to use: TONS of diff. mixes of apps, hardware, data, & situations on the greatest field test there is - the web & its users.

"I do plan on writing such an application, but not yet."


That's good... think it out, get ideas & the ways to make them happen... you can do it, even though it may take time (& lots of work).

"Believe it or not even though I've written computer AI and what not, I still really haven't worked with a ListBox that much so I thought I'd play with that."


On AI: No doubt that chess game you mention, right? Just curious...

On ListBoxes:

Think of them as a Re-Dimmable array... because that's all they truly really are!

An array, but put into an object structure & made into a control .OCX tool, with the overheads of that, but just as item indexeable & flexible for insert, remove etc.

Before Delphi had redimensionable arrays (pre-Delphi 4 I believe), I used to use listboxes to do resizeable arrays, & it worked... bit heavier, but it worked the same way for all my intents & purposes for it!

"Basically you select what file you want to distribute and which folders you want to put it in. If I feel like it I'll expand from there allow users to back up the older file, have some compilation commands, and allow users to copy single files and or a selection of files and folders, but really I already have a lot more interesting products I'm working on so it'll have to take a back burner."


Heh, I know that feeling! Billion ideas coming faster than you can put them to paper/developer IDE and start testing them out!

Ideas are one thing, grinding them out & making them 'digital reality' is quite another & I am sure you are aware of that - the 'devil in the details'...

"Also I would like to have something that would FTP sets of files and folders via a decent script. I know CuteFTP can, but I don't think they do that great of a job."


There you go: Already thinking of more to add-on to your existing idea & tool... nothing wrong with making something that does the job better than another tool does, albeit one that is focused more on another specific task - FTP!

(Doing an FTP client is a nitemare if you ask me, I generally do not like doing TcpIP related code because of waiting on the net & I port them from C/C++ libs & code to Delphi, which is tough for me, alot harder than ports of VB code routines for example!)

"How'd InnoSetup work out for you? Did you try it yet?"


Not yet, but I will... I need to do a good setup program for my stuff & one that's small & self-contained. InnoSetup sounds as if it may fit the bill!

" Don't feel bad if you haven't some really nice guy from England went to all the trouble to mail me a copy of Delphi 7 and I still haven't used that either ."


Well, like I said before... you'd take to it like a fish to water probably! I find it easy to port VB routines I have done or been turned onto by VB guys I know to Delphi... much simpler porting than C/C++ to Delphi because the VB & Delphi syntax are SO alike!

VB & Delphi are getting MORE alike all the time: Mr. Gates hired away the chief designer of Object & Turbo Pascal and Delphi from Borland in fact, & alot of the data tools in VB since version 6 are alot like Delphi has had for ages... no small wonder, same genius behind them!

"I've just been too busy and I'm really starting to get good at VB so it's hard for me to want to use anything else right now."


I understand that: Master it as best you feel you need to, & if you need to later, master others. Again... time (and work)!

"Oh if you want to play my Checkers game (it's the lame ass bloated windows installer though) go to Checkers.net.

Cheers Amigo,
Christian"


I will have to check that out, I like a good game of chess! It's one of my all-time favs, & an 'eternal classic': The game of field general war really put into a game!



APK

P.S.=> Someone mentioned kixtart scripting up there... PERL is another alternate that's good & time-tested outta the UNIX world, ported to Win32... consider it also if you do not finish your VB one! apk

Post #118513
Edit Quote Print Solution Plonk Delete
Christianb
Senior Member


Posts: 759
Joined: 2001-11-10
Member No.: 7704
Icon 2003-01-13 00:48:57

Hi Alec,
By the way it's a Checkers game and not chess. Sorry . I chose checkers, because this was my first major programming expedition and I knew the rules were simpler than chess. I like chess better too, but since I've had to play checkers so much while developing this I suppose in some ways I like it's simplicity better now . Chess is however a far superior brain exercise . Hey I came across a bunch of cool source code at www.SysInternals.com. You should definetly take a look at what they have available and consider incorporating some of that into your own programs. Some of the source is open in that manner and some is not so you would want to pay attention to their licensing requirements. http://www.sysinternals.com/ntw2k/source.shtml
They even have the source for a defragmenter and a scandisk program.

Cheers Amigo,
Christian

Post #118534
Edit Quote Print Solution Plonk Delete
AlecStaar
Account Disabled


Posts: 51
From: A discrete point in the Space-Time continuum...
Joined: 2001-02-09
Member No.: 5224
Icon 2003-01-13 03:11:54

"Hi Alec,
By the way it's a Checkers game and not chess. "


Bwah... and you said YOU needed sleep in that other thread! I was the one that needed it... and still have not gotten any! Have too many things to do today... way too many, & must get them done!

"Sorry . I chose checkers, because this was my first major programming expedition and I knew the rules were simpler than chess."


That's cool, & that is a good way to do an "AI" type of experiment as well!

"I like chess better too, but since I've had to play checkers so much while developing this I suppose in some ways I like it's simplicity better now . Chess is however a far superior brain exercise ."


They're both fun! I enjoy both games actually...

"Hey I came across a bunch of cool source code at www.SysInternals.com. You should definetly take a look at what they have available and consider incorporating some of that into your own programs. Some of the source is open in that manner and some is not so you would want to pay attention to their licensing requirements. http://www.sysinternals.com/ntw2k/source.shtml
They even have the source for a defragmenter and a scandisk program.

Cheers Amigo,
Christian"


Naw, that is their work... I steer clear of stuff like that, the reaming of the code of others.

The only things I have done a port of were:

1.) The initial C/C++ libs for various IP tools & that was ported (as is the Win32 IP Stack itself) from UNIX sourcecode, but the diff. was I used various libs to make them graphical.

(I feel that if something like IP tools was ported from original code from UNIX (as was the stuff in NT/2k/9x/XP itself, but left in character mode form), then for me to do a graphical equivalent made me say:

"WELL, it needs more than just straight character DOS Window mode ports, & I will do what MS did and do a port, albeit graphical versions!"

It's like what Nico Mak did for WinZip: He used various libraries to create WinZip... it's in the credits for the program.)

2.) And, a couple small VB routines (one for clearing the desktop of icons & making the desktop be able to be hidden, & then visible again... one for refreshing/repainting the desktop periodically) that a guy named Harold Brinkhoff from Belgium had that I ported from VB to Delphi: Fairly quick work if you do both tools/languages.



Other than that & using some prebuilt DLL's and OCX + VCL (which I could not avoid really without tons of work)?

I won't "ream" straight code off of others, especially stuff that really does not need change or improvement... I'd say most of their work's do not!

(I have certain personal "rules" about using the work of others, those are pretty much it!)

APK

P.S.=> Thanks for the suggestion though, they DO have nice work those 2 guys there... apk

Post #118538
Edit Quote Print Solution Plonk Delete
AlecStaar
Account Disabled


Posts: 51
From: A discrete point in the Space-Time continuum...
Joined: 2001-02-09
Member No.: 5224
Icon 2004-05-21 09:25:24

Originally posted by Christianb:
"Hi Gang,
I need a program will replace all instances of a file on a drive or drives with a newer version if there is one. Does anyone know of such an app?
Thanks,
Christian Blackburn"


I just wrote one up CB, & if you're still around, you can give it a shot!

Our conversation above "inspired" me to do this in fact... why not?

It's a NICE add-on to my toolset that has alot of uses! In fact, for you in particular in this thread? Should be perfect!

(And, designed just as I describe it above pretty much as far as its architecture/theory, & works fine in practice!)

ANYHOW, on purpose:

It's main purpose really is to just find repeated occurance of files, a duplicated file finder!

However, unlike others out there that only really check on filename & datestamp, mine goes a LOT further to verify file duplication results veracity...

ANYHOW, on technical-superiority vs. other dup filefinderse:

How so, as far as "superior"?

Well, it finds dups/dopplegangers using the usual name & filesize data stamps first, but then digging deeper into optional Version stamp info. (if file carries it, .exe types usually only), CRC-32 calculation, + checksum calcs & time/date stamps...

(ALL on by default, but you can turn them off with checkboxes & it saves your settings for next run as well as filemasks you used for next run!)

It finds them on a disk you scan, & offers file mgt. tools like copy, delete, move, rename, etc. & more once they are found, so SHOULD fit the bill for you because of those functions that will allow you to perform the tasks you wish!

Heck, even if the file is locked many times because of being loaded (rename it first, then copy over the one you wish to the folder concerned) it can replace it.

* If that does not cut it, then a file like that that is constantly being called can be replaced by using inuse.exe (during explorer.exe shell uptime), OR crashing explorer.exe via taskmgr.exe & doing the move/rename/copy, OR using Recovery Console to do it (manual, but those are your workarounds).

This is the ONE THING I could probably improve on it: The ability to replace ANY file with any type of lock on it... if inuse.exe can do it, so can I... I know the API for it or can find it pretty fast & implement it!

ANYHOW, on detailed help & rules of replacement:

This is a GOOD idea to do manually instead of en-masse/automatic...

There ARE rules, especially with .DLL files (or, .ocx but not as important here with ocx or OLEServer type DLL's because they're marshalled by GUID, rather than by filename like old-school type DLL's are).

The program in its HELP menu has a help file to enumerate the rules of "DLL HELL" & replacement techniques/procedures/things to watch for etc.

How it works, & what to look out for if you decide to replace files (like local app dir .dll version vs. system32 public accessible via system %path% variable & why that is done sometimes to avoid 'dll-hell', to help you make decisions on what to move, where, when &/or why etc.)

It's important to do MANUALLY, rather than 'en-masse' because sometimes as you probably know, dup named files are stored on disk in folders for a reason by coders!

E.G.-> For version mismatch-DLLHell avoidance & so their programs run right by getting proper return vals off API calls, all based on rules of search for files by .exe files ordering & also tunings to it as well...

(All explained in MASSIVE detail! VERY "to-the-point" too, as much as possible in 4 modal popup help dialogs!)

ANYHOW, on performance:

It is VERY fast (uses FindFirst Win32 API call for recursive scans) & is FULLY customizeable which will help YOU alot in your task! How? By providing first, generic filemasks you can search files for like *.dll, *.exe, (a list you can edit no less that it loads @ startup) & then it allows you to customize it (for specific filenames like mydlltoreplace*.dl* etc.).

The algorithms/engines for CRC-32 & CheckSum are VERY fast as well, I spent a ton of time on this & they come back with results on the files as fast as the GetFileVersion API does from Win32 API in fact.. a nanosecond!

Written in multithreaded/multitasking FULLY optimized Borland Delphi Object Pascal, with Win32 API use, & inline assembler code for speed + uses an Assembler written DLL file for fast copy functions!

Lastly, as a "+": It offers CPU priority level control REALTIME, HIGH, NORMAL, & LOW for scanning speed "manual transmission" levels of control as well during scans for more speed of operation still yet... "bonus"!

ANYHOW, on flexibility:

It comes with a filelist (.txt type, easy edit via notepad.exe but has own editor) that it loads @ startup which you can edit addto/removefrom extensions or WHOLE filesnames masks for search/replace as well... then, ontop of that, it has a manual filter entry field that allows even more 'fine-grained' control of the mask!

Plus, the right-click menu it has not only offers copy, move, rename, delete functions but also attributes checks (can remove or apply them +r +h +s +a & reversal too for remove of them) & manual checks on version, time/date, checksum, crc-32, & filesize as well for manual re-verify so you are 110% sure you have duplicates listed!

Any settings you make/prefer during operations you would like to use/reuse, like what algorithm/engine for duplication check to use of the 6 it has in extras above & beyond sizecheck & filename (defaults) of CRC-32/CheckSumming/Time-Date Stamp/VersionCheck for instance?

It saves for subsequent/future runs as the defaults @ startup!

Plus, lastly, it allows you to check/uncheck which of the file checks it uses of the 6 algorithms I employ for veracity of duplication as well!

(In other words, You have choice using it... on alot of its abilities!)



(So bottom-line: She performs, is flexible, & does what you ask for & more!)

* Let me know if you still need a tool like this... apk4776239@hotmail.com OR here in "PM" section!

407kb zipped!

With .exe you put in %WinDir% (or really anyplace on disk, it's intelligent & can self-guide itself) & .dll you put into %SystemRoot%\system32 (used Stamina32.dll assembler coded DLL file for FAST copies function, faster even than Borland Delphi Object Pascal native code speed, which is the fastest there is except for Assembler or straight C (not C++)).

APK

P.S.=> Example: Using it, I found 227mb of repeated .DLL files alone using it, & guaranteed repeats due to the 6 known & respected algorithms she uses... good stuff, got me more room (heck, 5 games/major programs worth of room!)...

It's not 'half-assed' by any means which you said you felt yours was @ this point... keep @ yours though, make it "un-half-assed", if you need code or help, let me know!

Oh, on my advice to use ListBoxes instead of arrays (or other data structures) if you don't like that OR need mixed data types (collections work here possibly, or custom records/data struct TYPES you declare)?

I used string lists in mine this round... very fast, no Listbox control .vcl or .ocx overheads of object instancing or size either! apk



[Edited by AlecStaar on 2004-05-21 11:07:49]

Post #139092
Edit Quote Print Solution Plonk Delete

Related Threads RSS

- I need a program (01/02/2006 11:49 pm)
- I need a driver restoration program: (03/06/2001 04:16 pm)
- I need a good freeware program to extract BIN & ISO file (12/20/2004 07:27 am)

Reply New Poll

Forum overview » Software » I need a program that will replace all instances of a file

Legend
View   View profile
Solved   Mark this post as solution (topic starter only)
Quote   Reply with quote to post
Edit   Edit post
Delete   Delete post (admin only)

Moderator: Open / Close / Bump / Delete / Move / Merge

All products mentioned are registered trademarks or trademarks of their respective owners.
© 1998-2009 Esselbach Internet Solutions - All Rights Reserved. Terms and privacy policy
Website powered by Esselbach Storyteller CMS System