Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


bphlpt

Patron
  • Content Count

    2,291
  • Donations

    $0.00 
  • Joined

  • Last visited

Everything posted by bphlpt

  1. Yeah, these kinds of things can be a fun kind of puzzle, and good practice. Minor questions: It's not necessary to check whether the drive letter is a valid character, or can there be a drive "#" or "}"? AFAIK, you can only have 26 drive letters., all alphabetic characters a-z. Isn't there another way to indicate "all remaining characters" other than "254" in - (SET DlP=!%1:~2,254!) -? Or is that not what that is implying? I can't remember off the top of my head. I was assuming you were using a maximum path length of 256 characters. And what if more than 256 characters are entered? I think the limits are supposed to be 260 characters including the drive letter, colon, path including trailing backslash and/or file name with extension, and a terminating null character. Of course the more recent versions of NTFS can handle longer limits, but then Windows Explorer won't be able to deal with them very easily. You'll end up having to rename various folders before you are even able to move or delete files, as I've run into on more than one occasion. Why the trailing space after !DlP! in - ("!DlP! ") - ? If the input string is not in the drive letter, colon, rest of path format, you currently consider it a fatal error. Is this a case of you oversimplifying things? A valid path does not require a leading drive plus colon. It's OK to just throw away any extra quote marks in and around the path, add a missing trailing backslash, and assume the remainder is OK, but if any other illegal characters are found then it's a fatal error? I just try to be consistent. EDIT: And, of course, the code will probably be different if we are testing for an existing location, or just a theoretical, correctly formatted string, to possibly be used at a different location with different resources than the current system has. [ I know, that comment is somewhat argumentative, no offense intended ] I think the testing of the first letter could be done with something "like": SET "Valid=ABCDEFGHIJKLMNOPQRSTUVWXYZ" FOR /L %%G in (0,1,25) DO IF /I "!%1:~0,1!"=="!Valid:~%%G,1!:" (GOTO :keep_testing) ELSE (SET DlP=ERROR&ECHO !Dlp!&GOTO :EOF) For testing an actual location, I suppose this could be adapted: (found here) for /f "tokens=1,2 delims=d" %%A in ("-%~a1") do if "%%B" neq "" ( echo %1 is a folder ) else if "%%A" neq "-" ( echo %1 is a file ) else ( echo %1 does not exist ) Note - This technique is intended to be used for a path without any wildcards (a single specific file or folder). If the provided path includes one or more wildcards, then it provides the result for the first file or folder that the file system encounters. Identical directory structures may give different sort order results depending on the underlying file system (FAT32, NTFS, etc.) Thanks for the fun and feedback. Cheers and Regards
  2. Well, when you put it THAT way... Point taken about ENDLOCAL. The matched quote routine was written to deal with other various variables, and was just reused for this application since it was handy, but your routine is MUCH more efficient when dealing specifically with paths. The errors aren't MY errors, but because of the data dealt with or user input. But like I said at the beginning, I'm sometimes guilty of the belt + suspenders approach to coding. Cheers and Regards
  3. I've written some code in the past where I made extensive use of passing back ERRORLEVEL to indicate which error occurred, and then just got in the habit of always ending my routines that way. I didn't see it as a problem since according to SS64:
  4. Thanks as always my friend, This shows how much I forget after I haven't been actively writing batch for a while. The routine as a whole was/is its own separate program that is called by an external application, as is md5sum.exe, so your comments regarding it are appropriate. Separating the actual "loop" into a separate routine helped simplify things. I sometimes "forget" about piping to "FIND", along with " /o-n " not being needed, so thanks for the reminders. I tried FIND as you wrote and it worked as expected, But when I changed how the routine was called, and referenced the location of md5sum.exe as being in the same folder as the this and the calling application, I realized I could also pass in the location of the temporary App.md5 as external to the folder I'm processing and then not need to check for it at all. To get the output from md5sum,exe to be formatted the way I wanted it, the working location has to be the folder of interest, which my previous method assumed, but that was easily accomplished with a pushd/popd. And your reminder that directories should always end with a "\" also simplified things a bit in the "loop". When I was dealing with some commands that had a trailing back slash and some that didn't, I got hung up on trying to work without one in all cases, and you demonstrated that it is usually easier to just add them back where they are missing, such as in the second "FOR". I was also able to move the cleanup and the check for the trailing backslash to the "outer" part of the routine to make it just a little bit cleaner. So this is how things turned out: @ECHO OFF SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION SET "_Dir=%~1" IF NOT "!_Dir:~-1,1!"=="\" SET "_Dir=!_Dir!\" SET "_Tmp=%~2" SET "_Md5=%~dp0%md5sum.exe" pushd "!Dir!" CALL :f_RecurseMd5 popd SET "_Dir=" & SET "_Tmp=" & SET "_Md5=" & ENDLOCAL&EXIT :f_RecurseMd5 %_DirNames% (SET "_Dir=%~1") FOR /F "tokens=* delims=" %%G IN ('DIR /-B/A-D "!_Dir!"') DO !_Md5! "!_Dir!%%G">>"!_Tmp!" FOR /F "tokens=* delims=" %%G IN ('DIR /-B /AD "!_Dir!"') DO IF EXIST "!_Dir!%%G\" (CALL :f_RecurseMd5 "!_Dir!%%G\") ENDLOCAL&EXIT See anything else I missed? Thanks again for the response and the help. Cheers and Regards
  5. I have a batch routine that works very well, but I thought it might be improved to not use a temporary file at all -- less wear and tear on SSDs etc. What I'm doing is checking a directory for the existence of files, not folders, and if found then proceed. Here is what currently works: ... (SET "_Dir1=%~1") & IF DEFINED _Dir1 (SET "_Dir2=!_Dir1!\") ELSE (SET "_Dir2=") DIR /-B/O-N/A-D "!_Dir1!">md5.tmp 2>nul SET /P _FirstLine=<md5.tmp del md5.tmp >nul 2>&1 IF DEFINED _FirstLine ... ... Any ideas on how to not need a temporary file? I don't care at all what the file is, I just need to know if a file, not folder, is present. EDIT: I still want the answer to the above, if there is one, but I will also admit that step might not even be strictly necessary. I'm sometimes guilty of the belt + suspenders approach to coding. Here is the follow on code.: ... IF DEFINED _FirstLine (FOR /F "tokens=*" %%G IN ('dir /-B/O-N/A-D "!_Dir1!"') DO IF /i NOT "%%G"=="App.md5" md5sum "!_Dir2!%%G">>App.md5) ... I just wanted to make absolutely sure that the command [ md5sum "!_Dir2!%%G">>App.md5) ] was not run unless there was a file to run it against. This isn't the only time that command is run, but rather I recurse through the directory structure and I didn't want there to be any chance of garbage of any kind ending up in App.md5, not even empty lines. To be thorough, here is the entire function: :f_RecurseMd5 %_DirNames% SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION (SET "_Dir1=%~1") & IF DEFINED _Dir1 (SET "_Dir2=!_Dir1!\") ELSE (SET "_Dir2=") (DIR /-B/O-N/A-D "!_Dir1!">md5.tmp 2>nul) & (SET /P _FirstLine=<md5.tmp) & (del md5.tmp >nul 2>&1) IF DEFINED _FirstLine (FOR /F "tokens=*" %%G IN ('dir /-B/O-N/A-D "!_Dir1!"') DO IF /i NOT "%%G"=="App.md5" md5sum "!_Dir2!%%G">>App.md5) FOR /F "tokens=*" %%G IN ('dir /-B /AD "!_Dir1!"') DO IF EXIST "!_Dir2!%%G" (CALL :f_RecurseMd5 "!_Dir2!%%G") :f_CleanUp FOR /F "tokens=1* delims==" %%G IN ('"SET "_" 2>nul"') DO (SET "%%G=") & ENDLOCAL&EXIT /B 0 ...which can be called either while already in the directory you want to examine ( so no argument is passed ), or pointing to the directory you want to examine. Thanks in advance. Cheers and Regards
  6. Don't apologize for that viewpoint. I hope that most of us at MSFN are 100% behind the idea that ANY user should have the right to use ANY software, including ANY OS, on THEIR machine if it meets THEIR needs, and we should not criticize them for it. We are here to talk about their, and our, experiences and help others as we can. Cheers and Regards
  7. @siria: I could be wrong, but my impression of what @Wunderbar98 meant by "vanilla" Win98 was that he was fine with official MS updates and service packs designed and released for Win98 to the general public. He just didn't want to add any unofficial Service Packs, or Revolutions packs, or 98SE2ME, or KernelEx, or anything else that wasn't officially released by MS specifically intended for Win98. Which is also the way I understood @rloew to be on the whole, though he was willing to write his own improvements to allow it to work on more modern hardware. So maybe not as vanilla as what I understood you to say. Cheers and Regards
  8. You know that, as thread creator, you can edit the thread title any time you want, right? At least I think so. Cheers and Regards
  9. [ I was offline for awhile, now I'm back. ] @Goodmaneuver: When I first downloaded both torrent files they loaded fine but wouldn't connect with @Drugwash, so I wasn't getting anything downloaded at all. When he put the file in his DropBox, I downloaded that, then copied it over on top of where my torrent client was trying to download the second torrent, ( I didn't have to repack (*) it to 7z, because it was already in that format when I downloaded it ), then had my torrent client Force Check the file. Since the second torrent and the DropBox contents are identical, it matched, the torrent client thought it had downloaded the file so it was happy, and it began seeding, which is when you began downloading from me. Since the second torrent and the DropBox was just the first torrent contents zipped up by 7-Zip, I then expanded what I had downloaded from the DropBox, copied the expanded contents over on top of where my torrent client was trying to download the first torrent, then had my torrent client Force Check the files. It matched, the torrent client thought it had downloaded the files so it was happy, and it began seeding, which again you eventually began downloading from me. I could occasionally see whom I assumed was @Drugwash through my torrent client, but as far as I know I never saw him able to connect. I don't know what the issue was. My torrent client also never saw any trackers associated with either torrent, which makes sense, since @Drugwash says he didn't assign any when he created the torrent. Bottom line, the DropBox and the two torrents are just three different ways to get the exact same files, which was essentially proven by the way I loaded the two torrents to be able to upload them to you. Since @Drugwash is keeping his DropBox link published and active, and because AFAIK you are the only one who downloaded any of either of the torrents from me and you eventually got all of the files, I'm ready to stop seeding both of the torrents. If either you or @Drugwash want me to keep seeding so that you can experiment to see what the best torrent client and settings are for your use in case you need to use that method of file transfer in the future, (which is probably a good idea), I'm glad to do so, at least for a few days, but for the access of the AHK scripts, the DropBox has done that job. Let me know how I can help you further. (*): I think I remember reading that you had your torrent client automatically expand anything that it downloaded? If so, then since @Drugwash's files were all 7-Zipped inside folders, inside another folder, then 7-Zipped again, could that explain why it was bogging down for you? Just a thought, and I might have not have remembered correctly. Cheers and Regards
  10. I don't know. I never go there. Why did you? Curiosity I guess? Cheers and Regards
  11. For the "1st", expanded torrent I have transmitted 132MB and for the "2nd", 7-zipped one I have transmitted 125MB, I believe all to @Goodmaneuver EDIT: I would suggest he just pick whichever one he wants and download it, or just use the DropBox, but it's up to him. Doesn't matter to me. It looks like he is rebuilding or Force Checking his files because they are now at about 50% each with nothing currently being transmitted. Cheers and Regards
  12. The contents of both torrents and the DropBox are all essentially identical. The DropBox and the "second" torrent ARE identical, and the "first" torrent is just the second one expanded. I have been continuously seeding both torrents since I began. There have never been any trackers for either torrent. @Goodmaneuver is currently the only peer listed for either torrent, and shows as being was showing as 92% and 94% complete for the two torrents, but is now only showing as 15% and 20%. Cheers and Regards
  13. The two torrents are now both seeding (same content), and I'll continue to do so for the next several hours, (longer if you request), then I'll quit. Thanks for the scripts, and the warning. I'll be sure to check the licenses as appropriate. You can delete your DropBox link if you desire. I don't know how widely you wanted to share these files. After I quit seeding, I won't share these files with anyone else without your direct permission. Glad I could help. Cheers and Regards
  14. The first torrent should also download now as well
  15. That worked, and I'm now seeding it back via the torrent. Can you see it?
  16. You sometimes show up briefly when I "Search DHT", but the connection always times out.
  17. @Drugwash and @Goodmaneuver: I tried to get DW's files via torrent. The torrent link downloaded fine, and loaded quickly onto my torrent client of choice [ Tixati v2.57 Portable on Win7 ] I see the list of all of the files, but I don't see any peers, seeders, Trackers, or any activity whatsoever. DW, are you still seeding? GM did you ever get anything downloaded? If the answers to those questions are yes and no, then I think something went wrong with the torrent creation. EDIT: Similar with the new torrent. I see the file, and I see who I assume is DW as a peer (from Romania), but it doesn't connect, the connection just times out. EDIT2: It looks like I can connect to Goodmaneuver, (from Austrailia), when he is trying to download, but I haven't been able to connect with Drugwash yet. Cheers and Regards
  18. @caliber: The way I interpreted @genieautravail's comment, was that the Russian patch was not 100% stable with Chromium based browsers, I assume that meant the Chinese 360 Extreme, but that it did work with it. The patch has also worked to his overall satisfaction, since he has continued to use it for over a year. He is willing to overlook things like not being able to use CHKDSK with certain drives, and the occasional BSOD. If the software he uses can take advantage of the extra memory the patch provides access to, then he apparently feels that benefit outweighs the infrequent, to him, inconvenience of being forced to restart his machine and other small aggravations. And that's great. Others, like @dencorso, believe that one BSOD is too many. The PAE patches by @daniel_k (especially when used to access more that 4GB) and @Dibya, of which I believe the Russian patch is one implementation, and probably the future patch by @Dibya and any other PAE patches, all suffer from the same weakness: the potential occasional instability for some people on some hardware using some software in some circumstances. Some folks might not have any problems whatsoever, while others can't get their system to last an hour without a BSOD. There is no way to predict with certainty how it will behave for anyone, and no guarantee. That's why MS pulled the feature from XP. They didn't want to deal with the complaints with no way to 100% fix the problem for all users in all situations. (Well, that and they're lazy, and greedy, and... LOL) Most of us at MSFN are 100% behind the idea that ANY user should have the right to use ANY software, including ANY OS, on THEIR machine if it meets THEIR needs, and we should not criticize them for it. We are here to talk about their, and our, experiences and help others as we can. But I emphasize that we are here to HELP, not do it for them or talk someone through every step, every single time. The general rule is we want someone to give it their best effort to do it themselves, preferably more than once, then come to us and tell us EXACTLY what they are trying to accomplish, EXACTLY why, EXACTLY which steps they took, with EXACTLY which tools, on EXACTLY which hardware, and EXACTLY what the results were compared to EXACTLY what they expected. [ Not just "I tried this program I read about and it didn't work"] At that point someone here might be able to help them thanks to the information they provided. The what they want to do and why are important because we might be able to suggest alternative solutions they hadn't thought of depending on what their need really is. If they are unable, or unwilling, to do the work themselves, then we will probably suggest that they try a different approach, or go do some more research before they try again. After all, as you surmised, and @dencorso and @daniel_k confirmed, much of the software for older OS, and the PAE patches in particular, "was made by geek minds for nerds only....." If the software you use can really benefit from the extra memory, and IF you are willing to do a lot of the work mostly yourself, and IF you are willing to live with the potential instability, and IF you feel you are capable of getting yourself out of trouble or are willing to just reformat and start over at the worst case, then by all means try the PAE patches and see if one of them works for you. But don't do it just because it's annoying that the OS won't use all of the memory in your machine, as much as I truly understand that motivation. In that case you might find that "using the Gavotte Ramdisk (using RAM above 4 GiB) for a pagefile, TEMP, and the temporary internet files from every browser", as @dencorso suggested, might better meet your needs. I sincerely wish you the best of luck and hope you are able to get your implementation of XP to work the way you want it to. Cheers and Regards
  19. @caliber, I say this with sincerity and kindness, but I think it might be best if you just leave this alone and stick with XP as it is for now. I don't think you are quite ready to try to use any of the PAE patches or make any other complicated changes to the OS yet. I'm not trying to insult you in any way, but you probably need to do a lot of reading and experimenting on a smaller scale for a while before you tackle anything of this magnitude. You need to learn how to execute command line programs, etc. When you previously pointed out the use of the Russian patch I thought you were further along, but now it seems you are currently only at the "point and click" level, so if, or when, you get into trouble you will have no way to get yourself out of it. If I have misunderstood your level of expertise I apologize, but that is how you are coming across. It's nothing to be ashamed of, we all started that way, but I think you need to do some reading. @Dibyais young and was fairly recently at your level himself (he knows how I respect how much he has learned and progressed in a relatively short time) so he might be able to give you some pointers. Cheers and Regards
  20. At the very bottom of the first post of the thread at the Russian site, do you see "4.9MB" followed by a "U" then a ~40 character alphanumeric string? That is a torrent magnet link. Assuming you know how to download with a torrent client using a magnet link(*), then you should be able to get the file from there. The link works, is well seeded, and downloads quickly. Cheers and Regards (*) If you don't, you really need to learn how to do this. You are bound to need this in the future, so it is a VERY easy and good skill and tool to have in your toolbox.
  21. Even though it has been suggested that it might just be that the restaurant is for discerning customers only, I thought that this site's behavior was very bizarre. I figured that no restaurant would want to exclude any potential customers, even if it only excluded those still using IE11, which admittedly might not be a bad decision. In my mind, this was a fault in the programming of the site. So unless the "missing" cipher suites, that Win 10 supports, are added to Win 7 and Win 8.1, this problem will continue to occur, because lazy site programmers will continue to exist, and will probably grow in number. Of course, those of us who never use IE if at all possible, and instead use a legitimate browser, might never run into the issue, but I think it is still worth knowing about. And I think it would be a good thing if all of the TLS and PSK cipher suites that Win 10 supports could be added to Win 7 and Win 8.1, if possible. TLS Cipher Suites in Windows 7 shows how to select the order of the cipher suites that are used by IE and your OS: ...but I believe that is only applicable to the cipher suites that are already a part of the OS, and to add any that aren't probably requires an update, like what was done with this one - https://support.microsoft.com/en-us/help/3161639. I have no idea whether it is possible to add the ones from Win 10 somehow, officially or un-officially, but it would be nice. Of course, if site programmers would just stick with Steve Gibson's cipher suite suggestions - https://www.grc.com/miscfiles/SChannel_Cipher_Suites.txt - that would also solve the problem. I also thank @VistaLover for his testing and reporting his findings. Very informative. Cheers and Regards
  22. If anyone can get IE to work it would probably be @NoelC, since that is his browser of choice, AFAIK. You might PM him and ask if he would check it out for you. I am curious as to what is going on. He primarily uses Win8.1 these days, but I believe he has installations of both Win7 and Win10 he can use for this kind of testing. Cheers and Regards
  23. After further testing, trying to load the problem page (https://www.cote.co.uk), on Windows 7 Pro x64 it loads and works just fine on the following browsers except as noted: SRWare Iron v72.0.3750.0 (64-bit) Firefox v70.0.1 (32-bit) Firefox v70.0.1 (64-bit) Chrome v78.0.3904.97 (64-bit) Opera Next v23.0.1522.28 -- No background video Opera v65.0.3467.42 Slimjet v24.0.6.0 (based on Chromium 76.0.3809.87) (64-bit) Vivaldi v2.9.1705.41 (Stable channel) (32-bit) Vivaldi v2.9.1705.41 (Stable channel) (64-bit) SeaMonkey v2.49.1 SeaMonkey v2.49.5 (64-bit) IE v11.0.9600.19230 -- Doesn't work at all Cheers and Regards
  24. I asked a friend of mine, who also uses Window 7, to also check it out. His response was: Maybe someone could ask the restaurant's IT guy if they did something special? They might actually appreciate someone contacting them, since I wouldn't think they would want to exclude any potential customers. Cheers and Regards
×
×
  • Create New...