This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1301. |
Solve : Command Line: Did something cool today. Seems like there's more out there.? |
|
Answer» I actually don't really understand WHAT it is I did, but it worked like it was supposed to and I have to wonder what other efficiencies I could find with others tasks. Just looking for a book or "name" for this sort of thing so I can study/research if there are more/better ways to go about other administrative tasks.This a GOOD start from those web sites https://ss64.com/ https://www.dostips.com/ |
|
| 1302. |
Solve : Win/Batch: How to get the folder name from Var %1? |
|
Answer» Ive been cracking my HEAD the past few hours trying to figure out how to pull only the folder name from a path passed on by a varible. |
|
| 1303. |
Solve : batch file to move files into new folder based on artists name only before -? |
|
Answer» Hi all, I tried to modify this code for my situation, and think it's ok, but i'd ALSO like to add something else. I have about 60k of mp3 and .cdg KARAOKE FILES in one folder with multiple artists, I am looking to run a batch file to move all files by a particular artist into a new folder with the artists name and add "greatest hits" to each new folder that gets created. All files have a - after artists name, so I assume this is the delimeter. (coding novice) - would really appreciate and advice or help is getting the code right for the batch file please.....thanks in advance. |
|
| 1304. |
Solve : chkdsk C: /f/r/x not working? |
|
Answer» I think the HDD has a problem. When trying to clone to an SSD, the speed is around 4mbps. I enter the chkdsk command as above, say yes to check after reboot, and Windows 10 loads. Did an sfc/scannow and no problems were found. I don't think that command is the same as the chkdsk C: /f/r/x command. Does anyone know how to fix this?sfc is system file compare which checks your windows system files with a backup copy and restores any which are corrupt. |
|
| 1305. |
Solve : DOS 6.0 filetype underscore problem.? |
|
Answer» Hi, |
|
| 1306. |
Solve : How to start multiple instances of a command line application with a batch file?? |
|
Answer» I'm using resample.exe for Flight Simulator to resample imagery that shows in the sim as photoreal terrain. You use an .inf to specify the sources (.tifs plus their respective geographic information) and output (path\to\output.bgl). Normally I use a "Send to" command on my right click menu where I can select an .inf, right click, and "Send to > resample.exe". That works fine but now I have multiple .infs that I'd like to resample simultaneously so I have to select each one in turn and send them to resample. Resample is very slow and uses only about 10% of one core on the CPU so it's possible to HURRY things along quite a bit by running multiple instances, each working on different parts of the project. I'm trying to come up with a BATCH file that will spin off multiple instances of resample.exe each in it's own window, here's what a typical batch file resample command looks like: |
|
| 1307. |
Solve : Compaq Presario 4784 strange problems...? |
|
Answer» I have a Compaq Presario 4784 MS-DOS/Windows PC, with the accompanying Presario 1585 CRT monitor. |
|
| 1308. |
Solve : Batch Script - Setup command then change parameters for each call? |
|
Answer» HI, I want to setup a batch file that will run a JAVA JAR file that REQUIRES a number of parameters. The tidiest way (I think) to do this is to setup the command first, then for each call, change the parameters for the specific call. However, since the file runs sequentially, the parameters need to be setup before the command is setup. This means the command needs to be setup multiple times (after each set of parameters is setup/changed). Is there a way to do this that allows me to setup the command without expanding/replacing the parameters until after I setup the parameters? I'm guessing not, but please confirm. E.g. Simplified version to explain what I do and what I want. In reality there are many more parameters and many more calls. I use only 2 parameters and 2 calls below to explain. :: Start of file :: This is how it works now, but I need to set command twice using the same string SET "param1=a1" SET "param2=b1" SET "command=java theJavaApp.jar %param1% %param2%" %command% SET "param1=a2" SET "param2=b2" SET "command=java theJavaApp.jar %param1% %param2%" %command% :: I want to be able to set command just once (at the start) like below SET "command=java theJavaApp.jar %param1% %param2%" SET "param1=a1" SET "param2=b1" %command% SET "param1=a2" SET "param2=b2" %command% :: End of File I tried to set command by escaping the parameters like this... SET "command=java theJavaApp.jar %%param1%% %%param2%%" :: This sets command to what I want "java theJavaApp.jar %param1% %param2%", but it does not replace the parameters when I call the command. Is there a way to achieve this? SET "param1=a2" SET "param2=b2" %command% THANKS |
|
| 1309. |
Solve : Read multiple specific lines in txt file - save each line into a variable -Batch? |
|
Answer» Hello everyone, I'm writing a batch file to organize and manage my movies downloaded on my computer. The idea is simple, I start with the main page with 2 options, either watch a movie, or add one to the library. The library is basically a txt file with all the information about each movie. The add movie FEATURE asks users to insert movie name, year, description, and then opens a dialog box for the user to select the location where the movie is downloaded. it will then save the movie into movies.txt like this: |
|
| 1310. |
Solve : Concatenate two BAT commands to single line output? |
|
Answer» Hello! |
|
| 1311. |
Solve : Collect all IPs For online workstations only on my domain? |
|
Answer» Hi All, |
|
| 1312. |
Solve : I'm getting blue screens every few hours, what can I do?? |
|
Answer» My PC gets blue screens every few hours "Your PC has run into problems and needs to restart". |
|
| 1313. |
Solve : Reading text file line by line and do some operations - Windows Batch File? |
|
Answer» What I am TRYING to do here is to parse every row in filename.txt file and then run 2nd FOR loop to output it into another text file. Filename.txt has multiple rows which looks something like this: [email protected]|Filename.csv [email protected]|Filenam1.csv [email protected]|Filename.csv and so on. I need help in building a script to read the lines one by one for example I want to read [email protected]|Filename.csv 1st and then do some operations and after the operations are done, I want to to goto the next line and do the same operations. The output of the operations will be stored in a file and will be overwritten every time the loop counter increments and goes to the next line. My output file should contain only 1 row at a time and not all the rows. What I am thinking is to create a counter and then use that counter in the for loop and then do the operations but I am not getting the desired output. I went through the threads where something similar was asked but could not solve my issue.One more important point there is a pipe ('|') in the text file. I have tried this, till now: set /a count=0 for /F "tokens=*" %%a in (C:\filename.txt) do ( Set /a count+=1 Set output[!count!]=%%a echo %output[!count!]% Pause ) I am not ABLE to call or access this outside the loop, like I would like to use the 1st row which will be represented by counter=1 first in a different for loop do some operations and then come back and increment the counter=2 pointing to the 2nd row and do the same operations.Lets say we have a file called file.txt. Within that file I have the following rows: [email protected]|Filename.csv [email protected]|Filenam1.csv [email protected]|Filename.csv So what I want is to read/access each line one at a time. For instance, 1st we access [email protected]|Filename.csv then do some operation where I will be inputing [email protected]|Filename.csv into a temp file and use this file in a different for loop for some other operations. After this is done I want to goto [email protected]|Filenam1.csv and do the same operations and finally [email protected]|Filename.csv. Every time the increment happens, the temp file will be overwritten with the current row field and we will exit out of the loop when %1 = ''. I hope I have explained my problem clearly.Hi We can do like this script without using a temp file : Code: [Select]echo off set "File=C:\filename.txt" set /a count=0 SETLOCAL enabledelayedexpansion for /F "tokens=* delims=" %%a in ('Type "%File%"') do ( Set /a count+=1 Set "output[!count!]=%%a" ) For /L %%i in (1,1,%Count%) Do ( Call :Action "!output[%%i]!" pause ) Exit ::******************************************************* :Action echo We treat this line : %1 exit /b ::*******************************************************I've subscribed to this forum just to thankyou "Hackoo" for your solution. Worked like a charm. Cheers! Quote from: jonasgozdecki on September 03, 2019, 08:01:52 AM I've subscribed to this forum just to thankyou "Hackoo" for your solution.jonasgozdeck You are very welcome and anytime too Bro Have a nice day I have JOINED this form because this is as close to what I'm looking for as I can find... I want to take what you've created here and be able to select a line by choice and then use those variables only on that line... My objective is to take something like the following - Code: [Select]Variable1 Variable2 Variable3 Variable4 Description1 ComputerName1 ComputerUser1 ComputerPassword1 Description2 ComputerName2 ComputerUser2 ComputerPassword2 Description3 ComputerName3 ComputerUser3 ComputerPassword3 Description4 ComputerName4 ComputerUser4 ComputerPassword4 Description5 ComputerName5 ComputerUser5 ComputerPassword5 Description6 ComputerName6 ComputerUser6 ComputerPassword6 And then use it for creating something that would look like this - Code: [Select]Variable1's listed from text file - Description1 Description2 Description3 Description4 Description5 Description6 Make a selection: ((User ENTERS Variable1)) cmdkey /generic:"<line1variable2>" /user:"<line1variable3>" /pass:"<line1variable4>" <-------from a specific line a user selects mstsc /v:"<line1variable2>" /f <-------from a specific line a user selects Any help would be greatly appreciated... Quote from: Hackoo on June 13, 2017, 08:26:55 PM HiI had reposted this question as my own and Sidewinder answered! Here's his perfect reply -- thanks! Quote from: Sidewinder on May 21, 2020, 12:03:41 PM Batch language is truly ugly. That said, the batch LOGIC here is to create an in-memory array (of sorts), let the user make a selection and then create the parameters for the cmdkey and mstsc commands.My data in txt file is paths. I used command Code: [Select]start %1% to open a file, but it don't work. This is my code: Code: [Select]echo off set "File=D:\listpathfile.txt" set /a count=0 SETLOCAL enabledelayedexpansion for /F "tokens=* delims=" %%a in ('Type "%File%"') do ( Set /a count+=1 Set "output[!count!]=%%a" ) For /L %%i in (1,1,%Count%) Do ( Call :Action "!output[%%i]!" pause ) Exit ::******************************************************* :Action echo We treat this line : %1 start %1% exit /b ::*******************************************************Any help I appreciate and welcomelinhkythuat You should try something like that : Code: [Select]echo off set "File=D:\listpathfile.txt" set /a count=0 SETLOCAL enabledelayedexpansion for /F "tokens=* delims=" %%a in ('Type "%File%"') do ( Set /a count+=1 Set "PathFile[!count!]=%%~a" ) For /L %%i in (1,1,%Count%) Do ( Call :Action "!PathFile[%%i]!" pause ) Exit ::----------------------------------- :Action echo We treat this line : "%~1" to start "%~nx1" start "%~nx1" "%~1" exit /b ::----------------------------------- |
|
| 1314. |
Solve : Editiing hosts file...why so difficult?? |
|
Answer» It used to be a simple process to add a line to the hosts file either manually or by some third party software. Now it seems that all this has changed. It used to be a simple process to add a line to the hosts file either manually or by some third party software. Now it seems that all this has changed. FIXED! There was an OPTION in my antivirus/firewall software that blocks access to the hosts file! |
|
| 1315. |
Solve : Need backup/rar for mysql at Windows? |
|
Answer» hello friends Hi |
|
| 1316. |
Solve : batch file to restart all hosts included in text file with a random timeout? |
|
Answer» Hi all |
|
| 1317. |
Solve : How to "nest" the FOR command? |
|
Answer» THANKS to Sidewinder, I now have an automated process for getting the IP Addresses for 120+ machines using a file that has a list of all the computers I manage by name. I even got the info to pipe into another file so I can use the IP Addresses for something else. Here's the code for anyone else who may need it. I modified it so it prints the machine name with the IP address next to it. Thanks go out to Sidewinder for the initial coding, I just modified it to include the machine name and pipe it to a .txt file. Code: [Select]ECHO OFF IF EXIST IP_List.txt del IP_List.txt For /f %%a in (Computer_List.txt) do (ping -n 1 %%a | for /f "tokens=1-4* delims=: " %%i in ('find "Reply"') do (echo Workstation is %%a IP Address is %%k >> IP_List.txt)) To quote Sidewinder when he provided it to me "Yeah yeah, it's *censored* ugly but so is batch code." or something very close to that. What I'd like to figure out next is the process for "nesting" the FOR command. I see it in the code above but don't really understand the syntax. If anyone (including you, Sidewinder) can help me with this by replying or pointing me to an ONLINE resource that specifically deals with nesting FOR commands, I'd appreciate it. I'm trying to combine the "ping" command with another command (nbtstat -a most likely) that will allow me to strip out the MAC Address of the machines as well. I want to have all three pieces of info "pipe" into the text document Example Code: [Select]blah blah blah ECHO The Machine Name is %%a the IP Address is %%k and the MAC Address is %%x >> IP_List.txt Ordinarily I'd go direct with Sidewinder but I figure, just like the code at the top of this POST, someone could probably use the same info I'm looking for so I'll ask the question here and everyone else can benefit from the replies I get. Code: [Select] ECHO OFF IF EXIST IP_List.txt del IP_List.txt For /f %%a in (Computer_List.txt) do ( ping -n 1 %%a | for /f "tokens=1-4* delims=: " %%i in ('find "Reply"') do ( nbtstat -a %%a | for /f "tokens=1-2 delims=^=" %%x in ('find "MAC Address"') do ( echo Workstation is %%a IP Address is %%k Mac Address is %%y >> IP_List.txt ) ) ) Good luck with finding documentation on nested FOR statements. Even the MS documentation for a single FOR is severely LACKING. Personally, I find it easier to write them backwards...start with the innermost FOR and develop the outer FORs around it. On the other hand, if I were administering 120+ machines I would seriously consider using Windows Script but that's for another day. Good luck. Quote On the other hand, if I were administering 120+ machines I would seriously consider using Windows Script but that's for another day. Ordinarily, so would I but "The Powers that Be" limit how much us "Powers that Wanna Be" have access to. Besides, I know even less about scripting that I do .bat but that'll change too if I have any say in the matter. EDIT: It looks like the | is used after each do (XXX) statement to bring the next FOR command online before it goes to the next item in computer_list.txt. I had thought this was the case but wasn't sure how to tie it in. Thanks for the help. I can use this for other similar things where I want to pull a list of things and run a process on it. Dude, you RULE! Quote It looks like the | is used after each do (XXX) statement to bring the next FOR command online before it goes to the next item in computer_list.txt. Not quite. Nesting FORs is much like creating loops within loops, each with its own defined variable(s). Your first FOR sets up a loop to read the Computer_List file one record at a time. Each record (computername) is fed into a PING command (that's the purpose of the | aka: a pipe). The PING then pings a computer by name and returns an IP address, which the next FIND will parse according to the rules setup by the preceeding FOR. At this point you have a computername and an IP address. Next up, you take the computername and pass it to NBTSTAT, which returns a boatload of output and again, you go thru and search for "MAC Address". When it's found, the preceeding FOR has setup the parsing rules, and you can extract the the MAC address which is assigned another variable. Finally, you have variables (%%a, %%k, and %%y) with info you want, and output them to a file. The closing parens just close each FOR loop and it's BACK to the beginning to get another computername. When passing data thru the pipe from one command to another, it's easier if you run each command from the command line, check it's output and then setup the parsing rules accordingly. Of course its also a good thing if you know what command produces what output. Well, I'm sufficently dizzy. I sure hope DOS is not back to the future. But wait, Microsoft's new MSH/Monad is gonna make batch coders wish they never heard of batch language (think: batch language scripting on steroids). How we can add the serialNumber of these devices also |
|
| 1318. |
Solve : How to Auto Run Keyboard Shortcuts at Windows Sartup after a pause? |
|
Answer» What .bat file command run at startup ACCOMPLISHES the following: |
|
| 1319. |
Solve : Need help trying to start old IBM computer running DOS? |
|
Answer» I'll keep it short: I have in IBM computer from the 90's running on DOS driver 2.77 with data I would like to access and ideally move to a current computer. When I turn it on, with the original hardware, I only GET "161" and "163" and a error picture telling me to check the manual, which says a dead battery on the motherboard (likely due to sitting in a garage since 2006). When I connect the HDD to current hardware (like 2010) via female IDE to male SATA adapter, I instead get stuck on the attached pic (cropped to be <700KB). I don't know what to try so any help would be appreciated.This probably isn't relevant, but the originally this is an IBM Personal System/2, model 35 SX.There is no attached picture so we can't see what you are encountering with the drive attached to another PC. However, just to be SURE, you attached 2 cables to the drive, right? One is the IDE ribbon cable and the other a power cable. When everything is attached, can you hear the drive spinning? Does it make any noise or have any VIBRATION? When I connect the HDD to current hardware (like 2010) via female IDE to male SATA adapter, I instead get stuck on the attached picI'm not quite sure I understand, but are you trying to *boot* from that drive on new hardware? Typically you connect the drive you want data from to another PC as an additional drive, then you can copy or image the drive as desired from Windows or Linux. I'd guess it is crashing because of how much memory the modern system has. From the picture it looks like you are trying to boot from that disk, you don't want to boot from that disk. You should boot from the normal C: drive and then the attached drive should show up in File Explorer as maybe the D: or E: drive (It might even appear as a different drive letter depending on how many drives the system has). That way you can copy the data files you want from the attached drive to the C: (or wherever) drive in your current PC. Quote from: BC_Programmer on January 29, 2021, 06:16:44 PM I think those PS/2 models used a Dallas Clock chip. That's one reason why I haven't suggested he try booting from the ps/2 system itself. ACCORDING to this website: https://www.ardent-tool.com/disks/disks.html, the model 35 requires a Starter Disk for setup as opposed to a Reference Disk (I'm not sure what the difference is). The Starter Disk image can be downloaded from the site above but you will need a computer with a 3.5" floppy drive and image writing software like WinImage to create the Starter Disk.You probably know this already, but those pictures (approval must've been pending) is what I got when trying to boot from the drive. And when I connect it to another computer, the drive doesn't come up in "this pc" but it does in disk management. Disc 3, Unknown, Not Initialized. Would the data get wiped if I initialized the drive? Because similar to searching if it's safe to open a hard drive, some results say yes while others say no.Initialize is another word for format so, no, you don't want to initialize the disk. Doing so will make it difficult to recover the data you are trying to save.So initializing/formatting is off the table, what are my options? It doesn't show up with my other drives in "this pc" but does in disk management and DEVICE manager.Hi A couple of things 1. the drive is unlikely to auto detect, when the IBM system 35 was made you needed to get the drive geometry off the drive label and then load the hd's, cdy's, Sectors into the cmos setup. There being 46 standard drive settings and a 47th where you could load the settings in manually. The setup disk did this for you. What is the make and model of drive ? 2. As the drive is booting with the SATA to IDE adapter you should be able to access it if you get the correct parameters in the cmos. The serial number is UL00075698, according to the bios. Probably not relevant, but there is a barcode 180 degrees opposite the power and data connections: B1 QG5 022654. The (hopefully) attached pic is of the top of the drive. And on the back of the drive, I found: IBM PN64F8560 MODEL DT531B-8I |
|
| 1320. |
Solve : set command escape character? |
|
Answer» I've got the contents of a batch variable and I'd like to change "~" to "E;" (without the QUOTES). I THOUGHT this would work: |
|
| 1321. |
Solve : Finding the DOS "Short path"? |
|
Answer» I was originally looking to get a simple batch script to DISPLAY the DOS short-path via right-click context menu and perhaps I still am. |
|
| 1322. |
Solve : How to extract nth word from a list? |
|
Answer» I would like to extract the nthe word from a list. Just on the side, how do you insert code into the post as you have done Hackoo?I'm glad that you have solved your issue ! Did you mean how to format code into [ code ][ /code ] ? Just put your entire code between [ code ][ /code ] (Just trim the extra spaces between brackets) or select all your code and hit the button # for code ! And if you want to thanks someone , you have just a little link Thank member name Hi Hackoo, The format for the file attributes (-r--s----) I obtained while searching the internet here: https://stackoverflow.com/questions/9252980/how-to-split-the-filename-from-a-full-path-in-batch See the code extract: Code: [Select]set "filename=C:\Folder1\Folder2\File.ext" For %%A in ("%filename%") do ( echo full path: %%~fA echo drive: %%~dA echo path: %%~pA echo file name only: %%~nA echo extension only: %%~xA echo expanded path with short names: %%~sA echo attributes: %%~AA echo date and time: %%~tA echo size: %%~zA echo drive + path: %%~dpA echo name.ext: %%~nxA echo full path + short name: %%~fsA) Note the line 'echo attributes: %%~aA I have now noted the link 'Thank member'. Thank you for your patience. |
|
| 1323. |
Solve : How to create folders based on "PARTS" of file names and put them in there.? |
|
Answer» So, i'm not a computer engineer. just a regular man without knowledge in computer. I downloaded a torrent full of comic books, around 5000 of them, my problem is that, want to segregate them by author. the author was included in the file NAME with braket enclosure ( e.g. [Asamine Tel] ) but it takes too much time to make folders myself and move them all to those folders. |
|
| 1324. |
Solve : *.BAT script needed please help me.? |
|
Answer» ok HERES my script. |
|
| 1325. |
Solve : Fullscreen Batch files? |
|
Answer» How do i start a batch file in fullscreen MODE? Please help!!! Right click on it and SELECT properties. Click the screen tab. Select full screen. Click apply. Click OK.There is no Screen tab (this is a batch file)Not in 2k or XP - unless you know how. All VERSIONS of 9x have a screen tab.I use a Win2k system... thats the problem. I don't have a screen tab for batch filesAnother Microsoft inovation. It is in the manual under |
|
| 1326. |
Solve : Batch file to find a word on my drive? |
|
Answer» Hi Guys, |
|
| 1327. |
Solve : REMOVING n' CHARACTERS FROM THE END OF A DOS FILE? |
|
Answer» Hi... I am trying to find a way to remove 'n' characters fro ALL files in a DOS directory. I found this on the web but it doesn't work. |
|
| 1328. |
Solve : to get the PID from a process? |
|
Answer» I would like to start a PROCESS and capture the PID from this process, USING a batch file. |
|
| 1329. |
Solve : Batch File - Ctrl+Break/Ctrl+C? |
|
Answer» I would like to ask, if there's a WAY to disable CTRL+Break or Ctrl+C while running autoexec.bat? |
|
| 1330. |
Solve : using one batch file as a command in another? |
|
Answer» I've only just started using batch files and I think I've gotten a little to tricky for myself. |
|
| 1331. |
Solve : How to from Windows7 start a Dos file to run a Lotus123 spreadsheet program.? |
|
Answer» I am using Windows7 in 32 bits. |
|
| 1332. |
Solve : Move files based on Date? |
|
Answer» Hello all, |
|
| 1333. |
Solve : Script To Map Network Drives? |
|
Answer» Hi All, |
|
| 1334. |
Solve : Formatting batch file? |
|
Answer» I'm trying to make a batch file that will format the c: drive instantly, without prompting the user. I tried: |
|
| 1335. |
Solve : Boot problem... plz hlp? |
|
Answer» I'm having problem whit my computer I cant start it. It worked just fine before just a little slow so I thought It needs to be rebooted so I did that but now i will not start... I come as far as to the Win XP loading screen then I get a blue screen for about 0.001 sec and then i reboot itself... |
|
| 1336. |
Solve : Batch files in win2K? |
|
Answer» How do I use the set command to cause a batch FILE to pause for a given time (10 seconds) and then TERMINATE automatically? Do I need to create a PIF to do this? If so, how? |
|
| 1337. |
Solve : SHELL=in config.sys->File Creation Error @ boot? |
|
Answer» In Windows 98, I've added |
|
| 1338. |
Solve : open/Close com ports? |
|
Answer» New User,Thanks for reading this; |
|
| 1339. |
Solve : Delete specified multiple lines of a not in use batch file through another batch? |
|
Answer» For example let's SAY i have the following program: |
|
| 1340. |
Solve : Read text file and save to a variable? |
|
Answer» Hi All, Squashman wow you woke up hungry....PRETTY Good. Staying Safe. I doubt any of the original users will come back to all the questions I answered but at LEAST they have an answer for posterity's sake. |
|
| 1341. |
Solve : Can i create a batch that ends at a specific date which means it will be a trial? |
|
Answer» I want to create a bat file that will end at a specific date Just a FYI... anyone who knows how to open the batch file in notepad etc can extend the date that it expires or remove the expiration completely! Only way around this would be to compile it to protect it from editing. There was a Batch to EXE compiler years ago, but I haven't messed with that in ages to say how strong it is to protecting contents from view or alteration when in EXE form. Thanks, DaveLembke I already found some programs to compile my batch from any manipulate content but also thanks for your reminderI highly recommend using Dave Benham's Obfuscate Batch instead of the Bat to Exe files that really don't hide anything. Quote from: Squashman on March 30, 2021, 09:30:10 AM I highly recommend using Dave Benham's Obfuscate Batch instead of the Bat to Exe files that really don't hide anything. Thanks, Squashman for your ASSISTANCE and What is the difference between Dave Benham's Obfuscate Batch and the normal converter? Or Do you mean that we can use this batch as an intermediate step between my bat file and the conversion step? Quote from: Abo-Zead on April 11, 2021, 06:05:01 PM Bat to EXE converters are not compiled. They are a self extracting executable. It extracts the contents of the program to a temporary folder and then executes the batch file. Not hard to find for any remotely computer savvy person. Dave's Obfuscation code keeps the bat file as a bat file but in a pseudo encrypted format. While it is possible to decrypt the bat file it will take a bit of thinking or brute force to do so. Dave and I had a discussion about keeping the encryption key separate from the batch file itself and we did a proof of concept on that as well. Sort of like need for the private key of a pgp pair. If you don't have the decryption code you would have even a more difficult time decrypting the batch file. |
|
| 1342. |
Solve : How to find file in Zip files... Help please? |
|
Answer» Hi could nned some help here, please.... |
|
| 1343. |
Solve : Isn't it good to have DOS?? |
|
Answer» Who likes DOS? I love DOS, because it is so easy to use.Some of the low level STUFF I like to customise would be harder WITHOUT DOS. Thus I stick with Win98SE vice UPPING to XP or NT. |
|
| 1344. |
Solve : How do I use Edlin?? |
|
Answer» How do I use Edlin? EDLIN /? will get you the list of commands. Searching for the term will get you ASSORTED references to its use. |
|
| 1345. |
Solve : *.com files? |
|
Answer» How do I create a .com file? I don't want to CONVERT a .bat file to .com, i want to create a .com file itself.With knowledge of hex code and a hex edittor. Or you can use an ASSEMBLY LANGUAGE TOOL or EDLIN and DEBUG to compile assembly code to EXE or COM. |
|
| 1346. |
Solve : freeing up space? |
|
Answer» not sure if this is ok to do in this area but i have a problem. im in dos and am trying to free up space to download windows 95 but because i only have a prompt on screen i am not sure how to do it. can anyone help? thank you in advanceTo free up space in DOS... Copy stuff you want to some convenient storage MEDIA (CDRW drive, tape drive, floppy...) before deleting it. Put the line set dircmd=/a /p in AUTOEXEC.BAT so your dir command shows all files and displays them a page at a time, and use ATTRIB command to clear Readonly, SYSTEM, and Hidden bits from superfluous files (like in the %temp% directory) before deleting them. Check the %temp% directory (should be c:\temp or c:\windows\temp, but some setups ACTUALLY use the c:\dos directory...) and delete all TMP files. Empty any 'delete catcher' or 'recycle bin' directories. |
|
| 1347. |
Solve : Batch conversion issue? |
|
Answer» Hi all, The last line is your ffmpeg command, so any parameters you want to feed to ffmpeg would go there.Your comments have nothing to do with this thread at all. Did you mean to post this in a different thread? Quote from: Abo-Zead on March 23, 2021, 09:26:10 AM You must have another text file named "hosts.txt" contain at all hostnames separated by Enter buttonHow about we call it what it is. A carriage return and line feed. Or hex 0D 0A. Or for you really big nerds: 0000110100001010 Quote from: Sidewinder on March 25, 2021, 01:13:52 PM I converted your file using Bat To Exe Converter v3.2 and using an empty hosts.txt ran your script with no errors. It may have to do with the converter you are using. In line 54 the hosts files is referenced with no path, so the current directory is used, but the converter may have either changed it or put it in a different variable. Thanks, Sidewinder for your help and no secrecy in my question it's just simple bat file |
|
| 1348. |
Solve : Found spaces in my output inside created file ....why?? |
|
Answer» hi all I have a batch to create an output text file containing all serial number of all workstations With the help of an external file that contains the names of the hosts |
|
| 1349. |
Solve : Still get output to file if no file exists? |
|
Answer» WRITTEN a simple batch file that runs every minuet and will ftp files to another machine and outputs results to a log file. Unfortunately with using *.* it still tries to ftp and outputs to the log that no files where copied. We want it to only write to the log file if it does something. This is fine if you put *.pdf but not *.* This is the batch file as it is now. ------------------ ECHO off E: cd "\workflow\administration\direct input" if exist *.* goto COPY goto END :COPY FTP -n -i -s:d:\scripts\workflow.scr >>d:\scripts\logs\workflow.log move /Y *.* ..\postftp :END How can we still have all files rather than specify a type and get it to skip to END when the folder is empty? Thank you for your time. Mia If there is a specific file that is always existent in the directory when it is used (such as TOC.TXT), have the test check for that vice *.* Or if you generate PDF or DOC or TXT files invariably to the directory every time it is in use, key on the extension (*.PDF) for the initial test. Testing for *.* is like testing for nul: in a directory, it only verifies that the directory exists. You MIGHT ALSO use an if loop and ERRORLEVEL to report on attempts to copy and move, and skip reporting and FTPing if there are no files that way. |
|
| 1350. |
Solve : Find Network Adapter name and store this name inside a variable? |
|
Answer» Hi all All the examples I see on the web say this is proper syntax Thanks, Squashman Your opinion is correct but also I saw the previous code on the web, kindly look into this link As PROOF https://stackoverflow.com/questions/19831023/enable-disable-network-connection-from-command-line. , so I'm trying to merge between two this command and Hackoo array |
|