Jump to content

AceInfinity

Member
  • Posts

    20
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Canada

Everything posted by AceInfinity

  1. Here's a wait animation I wrote a while back, Only it's not based on a countdown: @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION SET /A numtimes=3 FOR /L %%G in (1,1,%numtimes%) DO ( CALL :WaitDisplay "Please Wait" ) CLS ECHO Done! Press any key to finish... PAUSE > NUL & GOTO :EOF :WaitDisplay SET string=%1 SET string=%string:"=% SET dots=... FOR /l %%G in (1,1,3) DO ( CLS ECHO !string!!dots:~0,%%G! PING localhost -n 2 -w 500 -l 5000 > NUL )
  2. Powershell is something i'm quite familiar with, but I never would have found it a while back without trying to learn about batch. Perhaps It's senseless to keep batch as a part of my background knowledge and keep with Powershell? I've made lots more with powershell for my love of it's functionality over Batch, and i've created a few commandlets of my own that I can run through a quick console to do certain tasks that save me time on my computer. Don't get me wrong though, batch still has some uses, but with Windows 7 where Powershell is built in by default for me, and even same with Windows 8, i'm pretty sure it will become the new batch in a little while here. I find Powershell lots more enjoyable though, as it can create GUI's as well if you utilize and reference the system namespaces.
  3. I have used perl, I created a file compare script in the past, which was mentioned in one of my earlier posts in this thread. But I wanted to see what I could do with batch just for personal learning experience That's true, i've been told to not use MD5, so maybe an SHA1 hash version of my perl script for the file comparison? My perl script does use a hashing comparison method, but currently the only way I knew this through batch was through a program called fc.exe which I found on Windows through some searching lol. jaclaz told me about Comp, which I may look into next...
  4. I don't need to endure belittling comments like this in my attempts to just try and learn something. All I want is advice, and I'll pursue the necessary steps based on feedback I've been given to improve on this. That's all I really want here... Please note that I already mentioned my awareness to the system file checker command, and how I was just trying to find a very quick example. The use of this thing is limited to imagination, disregarding the limits of the script itself for larger files which has also already been made well aware to me throughout this thread by several other members. I don't need to have it reiterated to me over and over, that only really just gives me a headache and adds to extra posts in this thread that give me deja vu when I find out I'm reading what's already been told to me though. I KNOW I'm not the greatest batch programmer, but I need some new information as well. Having it bashed into my head from criticism on how my script here is useless does not help me. It may be useless no matter what I do to this script. But I just want to learn how to improve on it so I can become better at batch. I'm not looking to make a masterpiece here, or the absolute best script in the world for comparing files. If I was to do that, I probably wouldn't even use batch as it's slow anyway. Take a look at what you've said to me below here... This part is something new to take into account. I already know well about password authentication and hash comparison methods, specifically used on websites for the most part to authenticate a user to a MySQL database, and either SHA1 or MD5 are most commonly used for that. What would be the purpose of comparing DVD's though? Multi-threading can be of use, it just depends on how you want to use it. As you say you could compare 100 different files on a same thread, but memory would be a factor there. There's nothing wrong with MD5 in my opinion. It still works. There's tons of hashes out there, but MD5 is common in most things. If you say SHA1 is still "good enough" then I don't see a reason as to why MD5 can't be classified in the same way. As jaclaz said, and I myself have never came across an MD5 collision either, it's highly unlikely, and still fairly unlikely unless you look to try to match them purposely. But that would be hard to do with something like malware because you'd need to have the malicious function operational, while still trying to match an MD5, and just binding the file alone you're going to have to try to calculate how that can be done if you're binding to a windows file. This would include possible compression of that windows file to make sure that your binded malicious code matches the original filesize as well after everything is done. Not a very easy task for malicious code developers. It's still a VERY common and used hashing algorithm out there, so there must not be anything wrong with it. C programming language is old, but it's still used out there lots. Being old doesn't mean we're forced to the idea of change because of the fact that it's old that there must be something better out there.
  5. Good. JFYI, a small batch file (by mere coincidence also using FC.EXE) I just posted: Take into account that it is posted in a very specific thread and aimed mainly at people that do know where their towel is and it is admittedly experimental. jaclaz Thanks for that reference I will definitely take a look jaclaz Much appreciated! Taking the scenarios above, could you explain how I would do this using your script as posted and improved upon thus far.Which files would I select in, for instance, system32 together with my suspect system32 file in order to start a comparison? Now why would you do that in perl and not in the batch script? Based on the method you are using and the potential time it takes and, as jaclaz above states, the possibly huge output file to check that is exactly the kind of thing I'm expecting you to think about. I know that's a decision you could make yourself manually when selecting the files in your explorer window, but why accept manually when you're creating a script to save time. I was just trying to find a reference in a way that I could show you how it may be useful, however, maybe a utility like system file checker would be better for system files to check their file integrity, but if you saved a backup of explorer.exe somewhere, knowing that it was the factory default for that file. And you noticed odd behavior in your current explorer.exe (with non-regard towards the file size differences, if any) you could compare with the original explorer.exe that you have backed up someplace, with the one that you currently use on your system. I'm just being optimistic now, but trying to think of ideas here. ... Hmm' date=' actually, see now we're getting somewhere! Thankyou for that suggestion... That is actually something to think about, and finally a post that I can use for improving this script. I am personally apologizing for the past posts i've made towards you, that's all I was really looking for in a reply from you. I'm dumbfounded as to why I didn't think of this earlier, but when I made this script I had forgotten that I had made a perl version to do a similar task as well. All my Perl scripts are backed up on my external hard drive, some which are more than a year old. I appreciate all of the responses i've been given so far, thanks guys! [b']Edit: Wait... YzOwl... What about file sizes that may be the exact same but have different binary data? In the case of my perl script, I was comparing for SIMILAR file's and that's only possible if the file size is the same, otherwise it would indicate that it's a different file and the MD5 would change. In this case i'm trying to compare for DIFFERENT files, although if I limit myself to files of different file sizes, what about the files of the same size that have different binary data that i'm not scanning because I limit myself in the scan to scan for files of different sizes only? Also, how would you go about scanning files of mass filesizes? (Bigger files) In Perl I'm given the benefit of multi-threading, but i'm not sure how I could do this in batch (not multi-threading, just scanning larger files) ~Ace
  6. I agree, but I doubt anyone still uses earlier than Windows 2K/XP. I have a 95 machine, as well as a 98, and 2000 all 3 of which in working condition still that I haven't used for general or "real" computer use in years. This kind of feedback I can respect though, now we're actually getting somewhere lol I was going to iterate through the files in a directory to start off, but decided to take specific input args as files instead when I first started writing this script. I personally don't know of any other realistic built in Windows utility though that is like fc but can handle larger data though anyways. Not off the top of my head at least. Perhaps you have other suggestions on a "reference" that can be used? And i'll see what I can do to ultilize it to make a better more adaptable batch script? I have actually created a much better version of this in Perl, although using MD5 file checksums as my comparison and narrowing the search by only comparing files of similar filesize. I was just curious one day as to what I would be limited to if I was to do the same in batch
  7. Though it may be harder to copyright this new version I hereby claim copyright 2012 for the use of SHIFT /2 jaclaz lol no, that copyright is more just for the looks anyway, I personally don't care if anyone uses my scripts, or modifies them in anyway, but I can provide credits with the copyright if I ever repost it, but I doubt it, i'm already making newer projects outside of batch.
  8. These last three posts are what I was looking for Finally some advice that I can use towards the latter if I was to create a newer version now. Thanks guys! I'll see what I can come up with, and maybe to answer this quesion Yzöwl: I can do both? Provide a list of files that are identical and files that might not be? Maybe just loop more than once, to compare not just one file to all others, but every file to each other file.
  9. I'm not just a good I'm excellent. Why would there be tension, you asked for feedback, and I gave some! TBH if I were to ever come across a similar kind of problem I would be unlikely to use FC anyhow. Alright, you tell me all the bad things about my script, but you don't attempt to help me, you just point out that these things are bad. I can't claim that to be the kind of proper feedback that I was looking for to be honest. So far you're just telling me that you're absolutely "excellent" with batch, but you can't provide some help to others other than telling them that they are doing something that may not be the best method? That shows a form of arrogance at it's lowest level in my opinion, which is not a bad thing, but if you have such knowledge, can't you attempt to utilize it to provide feedback that can help others? Feedback that can be of some use to this person? You would unlikely use FC, and my method of determining whether any arguments are inputted seems "convoluted". Okay... Why then? You're posts don't provide any support for me, and are of zero value as of now though. It's like going to a math class, and some teacher telling you "No, that's not how you do it, try again". Well then.... "How do I do it?". That is my similar perspective here from that analogy.
  10. No that is unfortunately wrong, you can determine what param or arg %1 is by making sure that you want to compare with the file that you use to drag the collection of files with, is the one you want as %1. I've tested, and it's determined by the file itself that you drag over the batch, which gets parsed as the first argument after %0. For example: If you have 3 files, file1, file2 and file3. If you select all of them, and drag these files over the batch file itself by dragging file3 to move the files over the batch file to be used as arguments, file3 will become argument %1. I updated the year in the batch file lol. Batch files aren't compiled, so i'm freely able to edit that if I wish. Believe it or not, I created the script in 2011 but already had the year 2012 embedded in it anyways. It really plays no role on proof for when I created it though. For all you know I could have created this script more than a year ago (assuming the batch syntax would still be fitting for the NT version available to the user), but I still have optionality to change it to the year 9999 if I wanted lol. My mistake though... I had a version which used SHIFT... I had it in my notepad :S but it seems I copied out this one instead. I would provide a link to where I have provided the version with, shift, but It may be against the rules, so how about I just copy the code that I have pasted on another forum here to show you the version using shift to move the input argument up by one? Here's my first version: @echo off title Binary File Compare - Created by AceInfinity set i=0 set args=0 && for %%a in (%*) do set /a args+=1 && set "original=%1" if %args% lss 2 call :noArgs set /a args-=2 if not exist "bin_output" md "bin_output" ( echo.---------------------------------------------------------------- echo. Binary File Comparison Script - Created by AceInfinity echo. Copyright 2012 echo.---------------------------------------------------------------- echo. ) > "bin_output\results.txt" echo Processing Binary Data... :start fc /b %original% %2 >> "bin_output\results.txt" shift set /a i+=1 if not %i% gtr %args% goto start exit :noArgs echo No other input files as arguments could be found... echo Please specify at least 2 input files to be used for comparison echo. && pause exit This will use fc to compare files by their binary data with the /b flag that i've specified directly in the code. After comparing each file to the first argument as the original file in which all other arguments/parameters as files will be compared to, it creates an output text file as a log to return all of the results. If you have lots of files to compare, the buffer of the console window probably won't let you view all of the data, so it's exported to a text file instead. It may have been better to change the code to make an export of each comparison test to a new file so that the text file doesn't become too large, however I don't think anyone will be doing that, it will most likely be maybe 1-5 files. If you want it to export to a new file everytime i'll create a new revised script if anyone wants it that way. Important Note: The way parameters are defined, it basically uses the NTFS filesystem default from top to bottom I believe in the order that it places values into arguments that are sent (to my script in this case). Therefore you can't really choose which file goes where if you use the drag drop method, unless you open a command prompt and define each filepath manually. But that doesn't really matter as we know that if you select more than one file, WHILE DRAGGING THE GROUP OF FILES OVER MY BATCH SCRIPT THE ONE FILE THAT YOU USED TO DRAG THE GROUP OF SELECTED FILES IS PARSED AS THE FIRST ARGUMENT (%1) This may be handy for you to know, when you want to quickly compare all other selected files to a specific file of your choice. I DID have a video of it in use, by the video got removed, because my Youtube account was deleted a week ago when I decided to try to delete my Google account which was linked with it. And unfortunately google deleted it along with the account. My apologies though... I can't believe I missed that it didn't use shift. (the version of my script I posted) If you have troubles reading it, or using the script, then just ask me though. First script is the most updated version as I found that shift was useless if I could just use the for loop to loop through all of the values in the arg list. I know you're a good batch programmer, so no personal tension between you and me as a member, but I thought that someone may find this useful, or someone like yourself could help me improve it further. If you don't feel like providing the advice that I so kindly looked for, even after clarifying what my idea of the kind of feedback that I wanted for this script was, then kindly do not post in this thread anymore. That's all. At least i've gotten some advice on how to check for a minimum number of input args without looping and counting each which makes my script a bit faster, but as well as a couple other little things posted by other members here. Have a nice day ~Ace
  11. I created this some months ago to take inputs from dragged files as arguments/params to the batch file and loop through them with fc using shift, so that it would take in more than a max of 9 args @echo off SETLOCAL ENABLEEXTENSIONS title Binary File Compare - Created by AceInfinity set /a args=0 && for %%a in (%*) do ( set /a args+=1 ) if %args% lss 2 call :noArgs if not exist "bin_output" md "bin_output" ( echo.---------------------------------------------------------------- echo. Binary File Comparison Script - Created by AceInfinity echo. Copyright 2012 echo.---------------------------------------------------------------- echo. ) > "bin_output\results.txt" echo Processing Binary Data... for %%a in (%*) do ( if not %%a==%1 ( fc /b %1 %%a >> "bin_output\results.txt" ) ) exit :noArgs echo No other input files as arguments could be found... echo Please specify at least 2 input files to be used for comparison echo. && pause exit Perhaps someone else might find use for it, so I thought i'd share, and accept feedback on it
  12. Ahh I wasn't thinking at the time. I actually already have tools of my own for this then.
  13. Thanks a lot for the link I have lots of spare time on my hands for computers, and I was interested in creating a full theme of my own. I'm sure if system file checker raised any issues for me I could keep a backup of the original dll in my main system drive and replace it with the custom one if needed through cmd. But i'll stay away from them at this point, since it looks like there is another method here that you've pointed out to me. Update: Shame It's not free. People don't make it easy to develop for Windows do they? lol
  14. I could only find information about packing a .theme. Which is useless to me. I want to know how to edit the visual of more advanced things for windows 7 like the explorerframe, shell32, etc... How do these display the visual on a Windows 7 custom theme?
  15. Yeah, I don't like going against the rules. I am a fairly active forum member, and I do enjoy this forum. Don't want to be banned or anything soon or at all for that matter haha. I have tried contributing to a few discussions. Still waiting for replies on those topics however. I also asked because I couldn't find where I posted it, I thought it was removed or something, so I was just going to double check
  16. I'm looking into creating some Windows 7 themes, I've just recently decided to try it, so I haven't a lot of knowledge about it yet, maybe you could point me in the right direction? I have lots of programming knowledge, I'm just unsure as to how themes work with explorer.exe and a few of the other visual styles.
  17. Am I allowed to post one of my own application's here? (On the forum)
  18. Thanks for the link, however I don't really like adding addons that I don't need when I can do it all manually. It just slows the browser down if you have too many unnecessary ones
  19. I like that System Files Icons one (Last one) But the download link is invalid now.
  20. It's missing UMPlayer, and SRWare Iron for a web browser.
  21. Actually Firefox 8 is already out for testing/debugging (Nightly 8.0a1). I'm using it right now. All of my addon's were incompatible, but I unpacked and fixed/modified a lot of them so that they would work with version 8.
  22. Hey MSFN Just introducing myself here, i've been a programmer for a few years now, and I hope to learn and contribute to this community a lot! I'm currently involved in a lot of pretty much anything to do with computers from gaming, programming, graphics (modelling/rendering), music, customization and more. Hope to see you guys around ~Ace
×
×
  • Create New...