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.
| 4851. |
Solve : refresh a website with a .bat file? |
|
Answer» IM NEW at this, but can anyone TELL me if it is possible to REFRESH a webpage with a bat file? (example...refresh a webpage every 10 sec for an hour....) thanks much for your helpIt could be done, but would require more than batch to make it happen. Batch would only be used as timer and trigger for an exe. The exe would be a macro or program created to pass as F5 keystroke. This can be done without batch by the way in its cleanest form, you can write or have someone write a short program to trigger the F5 key every 10 sec for 1hr.ok...just WONDERED if there was a way. Thanks for your help. |
|
| 4852. |
Solve : Check file for a certain word if exist do this? |
|
Answer» I am running a batch to check if a database EXIST if it does I need to exit the batch or if the database doesn't exist then to continue with the INSTALL what am I doing wrong here any help is much appreciated |
|
| 4853. |
Solve : batch file to unrar one file from more archives to different folders? |
|
Answer» OK, now i GOT it working all the way to the unrar-ing... how can i add unrar.exe to the batch file? I installed unrar.exe (from winrar page) to program files, but i PROBABLY still need to add it to some library, or? woohoo got it working |
|
| 4854. |
Solve : looping through files in a given directory? |
|
Answer» OS : Win XP pro
if only it were so easy. I do not WANT to put all files back together. I like to add 5 small parts to make larger part but still want to have the original file divided into 20 pieces instead of 100 pieces. I uploaded one directory to my linux webhost where I happen to have shell access, and cobbled up a script in less than 30 minutes to accomplish that. Looking for a DOS/Command only solution to save me the trouble of UPLOADING and downloading files. |
|
| 4855. |
Solve : first time needing help with batch? |
|
Answer» Quote from: SALMON TROUT on August 28, 2009, 03:54:10 PM You said that ALREADY.For billrich. He only added the star after wait. Quote from: Helpmeh on August 28, 2009, 03:52:04 PM But dir /B *wait* will display ALL filenames CONTAINING wait in them.that's per OP's requirement |
|
| 4856. |
Solve : DOS Batch File - Incrementing in Loops? |
|
Answer» Dias - |
|
| 4857. |
Solve : Batchfile executing commands from a text file? |
|
Answer» Is it possible for a batch file to READ a text file and execute it's contents (all of them) in the same window?copy the text file into a batch file. in the same windowI need it to be in the same window. Is it possible?The steps I GAVE you will be in the same window.Oh, SORRY. Thank you. |
|
| 4858. |
Solve : find and replace batch file?..? |
|
Answer» Well I wanted to CREATE a batch file that would go through a text file and replace things. (aka convert) Either Salmon is joking or you should ignore him. We are all volunteers here meaning our help is 100% FREE$$$!Quote from: Helpmeh on August 23, 2009, 07:20:06 PM Either Salmon is joking or you should ignore him. We are all volunteers here meaning our help is 100% FREE$$$! I was being sarcastic; I have no intention of attempting to charge for any help I give on here (how would I collect?); I merely meant I would much rather see a project that someone has a problem with, and suggest a solution, than write a complex batch script from start to finish from a specification. To the OP You can read a text file line by line using FOR, you can split each line up with tokens and delimiters, and you can substitute one string in a line with another using the %string:abc=xyz% notation. Quote from: Salmon Trout on August 24, 2009, 12:34:49 AM I was being sarcastic; I have no intention of attempting to charge for any help I give on here (how would I collect?); I merely meant I would much rather see a project that someone has a problem with, and suggest a solution, than write a complex batch script from start to finish from a specification. That seems more than fair to me too.I also would prefer that, but there are cases that Person A tells Person B that he can do xyz with batch and learned it from here. Person B comes here and asks for a batchfile that can do as Person A mentioned. And I've always learned by complete examples, picking them apart to figure them out, and ASK questions if I can't understand a piece of code. Fair enough, but I object to doing student's homework, or IT staff's PAID work, for them Quote from: Salmon Trout on August 24, 2009, 05:05:05 AM Fair enough, but I object to doing student's homework, or IT staff's paid work, for themWe're not allowed to help with homework (or is it They aren't allowed to ask questions regarding homework). Quote from: Helpmeh on August 24, 2009, 05:13:30 AM We're not allowed to help with homework (or is it They aren't allowed to ask questions regarding homework).we can help with homework, just not giving them FULL solution. Quote from: gh0std0g74 on August 28, 2009, 06:26:25 AM we can help with homework, just not giving them FULL solution.True. Pointing them in the right direction is allowed. |
|
| 4859. |
Solve : Path with a variable? |
|
Answer» I have made a BAT for launching : |
|
| 4860. |
Solve : I have a wierd problem with a batch...? |
|
Answer» Hi, |
|
| 4861. |
Solve : command in my batch file? |
|
Answer» ALAN_BR, after I MADE that assertion, I did some experiments and came to a SIMILAR conclusion. Also, I found these things out: Zonealarm adds the line "Set tvdumpflags=10" to Win98SE autoexec.bat file..It's probably a variable for the tvDebug.log file which Zonealarm creates when it has a problem. Quote verflop.com ... may be connected with the KAK worm I think the "batch file" in question may be the autoexec.bat of an infected Win98 system. Quote from: Dias de VERANO on October 07, 2008, 03:41:23 PM Quoteverflop.com ... may be connected with the KAK worm i think we should get broni or evil in this CONVERSATION to check this out. |
|
| 4862. |
Solve : Can I use FORFILES to remove folders of files?? |
|
Answer» I have a backup script that places the backup file into a current DATE folder. I want to use a script to say truncate all folders that are earlier than 30 days from today's date Haven't tried this yet but it's supposed to move files to a second folder if they are 365 days old Will try it out. C:\>rmdir /? Removes (deletes) a directory. RMDIR [/S] [/Q] [drive:]path RD [/S] [/Q] [drive:]path /S Removes all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree. /Q QUIET mode, do not ask if ok to remove a directory tree with /S C:\>Quote from: billrich on August 23, 2009, 08:26:50 AM C:\>rmdir /?it just removes directory, but does not check for X days to delete. extra code is needed. |
|
| 4863. |
Solve : Question about FINDSTR command? |
|
Answer» When using the following code to check about the content of a text file (test.txt), Searches for strings in files. Hope this helps.Got it !! Thanks. |
|
| 4864. |
Solve : Batch file to log in a username and password? |
|
Answer» GOOD day, I'm new to this site and i'm a beginner with DOS batch files. Here goes my question... I mapped a DRIVE on which i installed a VIRTUAL machine (VPC). I get tired of always starting the VPC then logging in etc... So i want to create a batch file to: 1. start the VPC 2. Login 3. Start other batch files in the VPC Anyone know how to write the batch file to do this? MANY thanks, Chris I don't THINK it is possible to log yourself in with a batch file. |
|
| 4865. |
Solve : write ping and tracert to a txt file.? |
|
Answer» Hi! I need help with writing a BATCH file that would ping google.com every 5MINS, tracert google.com every 30mins, save the results to a txt file every 5 hours. if you could help me with this I would be GRATEFUL. You can use the windows scheduler to set off your tasks, logging the results is easy, |
|
| 4866. |
Solve : Batch file to copy files referenced in a text to a location? |
|
Answer» this should do it its just going to the command prompt and typing "for /?" It seems like magic to some people. Quote from: Salmon Trout on August 26, 2009, 10:38:56 AM It seems like magic to some people. But it is magic! BTW, I know I'm pushing my luck here however, is it possible SOMEHOW to find out the total duration of the copying procedure? i.e. the START and End time???Code: [Select]set time1=%time% your process here set time2=%time% echo started %time1% echo finished %time2%It basically starts copying and once all files are copied cmd closes so can't really see whether it reports the time taken for the process. Any thoughts? Many thanks in advance! Edit: Done it! Added a pause statement at the end of the script and I can now confirm it works fine! Many thanks again. |
|
| 4867. |
Solve : Starting Two-worded files? |
|
Answer» Yea, I SAW that and tried start "Example.txt" and it didn't work. I'm just confused as to why start "" "Example Text.txt" WORKS. It appears to mean a new window with no title and then the FILE you want to open. Once again thanks and sorry for all the questions. Hehe, no worries. We thrive on them. |
|
| 4868. |
Solve : if statement in *.ksh file? |
|
Answer» Hi, |
|
| 4869. |
Solve : email details? |
|
Answer» System model number? Is it located in a file too?Yeah i believe it also has to be queried using WMI. I can't find anything when i GOOGLE it and i did have this working about 3-4 years ago. I just can't find my documentation.Quote from: Helpmeh on August 26, 2009, 04:05:49 PM By briefly looking at the code I can tell that it requires outlook. Is there a code to do the same thing without outlook? CDO. http://www.paulsadowski.com/WSH/cdo.htmYes it does require Outlook. This is not a big deal because the mail is only internal mail to the IT department. The email SIDE of it is working. Okay, i found the way to display the model of your computer. However, i can not seem to get it to work in the "for" command. This is how to get the model (will not work on all machines, but works with DELL) Code: [Select]wmic csproduct get NAME and this is how i added it to the BAT: Code: [Select]for /F %%a in ('wmic csproduct get name /value^|find "name"') do set namestring=%%a for /F "tokens=1-2 delims==" %%b in ("%namestring%") do set name=%%c This is the entire BAT thus far: Code: [Select]@echo off @Title "Verifying Computer Details" for /f "tokens=2*" %%b in ('net USER "%Username%" /domain ^| find /i "Full Name"') do set DisplayName=%%c for /F %%a in ('wmic bios GET SerialNumber /value^|find "SerialNumber"') do set sernumstring=%%a for /F "tokens=1-3 delims==" %%b in ("%sernumstring%") do set sernum=%%c for /F %%a in ('wmic bios GET name /value^|find "name"') do set namestring=%%a for /F "tokens=1-2 delims==" %%b in ("%namestring%") do set name=%%c echo Full Name.........%displayname% >>"U:\IT\Details.txt" echo Username..........%username% >>"U:\IT\Details.txt" echo Computer Name.....%computername% >>"U:\IT\Details.txt" echo Serial Number.....%sernum% >>"U:\IT\Details.txt" echo Model Number......%name% >>"U:\IT\Details.txt" call "%~dp0\Email.vbs" call "u:\delete.bat" echo on Thank you for the assistance everyone! I hope some of this TOPIC is helping someone out! |
|
| 4870. |
Solve : RENAME DIRECTORY USING CLIPBOARD DATA? |
|
Answer» Hii everyone. i hav seen all ur questions n answers.. all r very good answers. now i need a HELP from u frnds. i want to rename a folder from clipboard DATA. suppose example. i copied a text "1-ABC123456", i want to create a folder with that name. 1-ABC123456.dir (everytime name changes, so when i copy and run any batch program, it should create a folder with that text which i hav copied) Thanks in advance frnds. hope i get results soon byebye I'm having a difficult time visualizing what you want to do. Batch code cannot interact with the clipboard which is a Windows component. Actually you'll need Internet Explorer to copy data to or paste data from the clipboard. Quote (everytime name changes, so when i copy and run any batch program, it should create a folder with that text which i hav copied) How does 1-ABC123456 get on the clipboard? Is 1-ABC123456 a string? Does it represent text from a file? If it's simply a string, you can persist data in batch by using the environment space or the file system. Need more details to be helpful. Thanks for your reply.. but am really sorry. 1-ABC123456 is not any string nor anything. i just gave an example of folder name. actually i have a list in online ... 1-ABC53452 1-ABC54567 1-ABC87452 1-ABC95457 1-ABC98665 1-ABC78934 1-ABC89034 1-ABC67893 .... .... ... (it goes approximately 1000 or above names i think) so i have to create folders with each of the name from the above list. (above all are folder names not any special characters nor any string nor any codes.) Create a folder in my desktop with a name from the above list. for example if u take any name from the above list. 1-ABC53452 is a name, with this name i have to create folder. (and onemore thing we cant download all names at a time. each name comes one by one) => copy a name from online .. => and create a folder in LOCAL DRIVE with new name. thats how GOING on. i just wanna to know ...is there any shortcut by running any batch program pls let me know.. if u still cant get it. i will try to explain more detaeiledif this page online is plain with just that names you can use wget to download copy of site to a disk and then use for command |
|
| 4871. |
Solve : REMOTE DEKTOP BATCH FILE? |
|
Answer» Dear Friends So you want to make a batch file start remotely on another computer and save a text file with information about the User and Computer? You can't be too SKETCHY on this one. You need to login with the other user's Username and Password just to access the remote desktop.Thanks friends I have created dos batch file , which creates temperory rdp connection and runs rdp which is WORKING fine but I am not sure WETHER it will work in all os's, It is working fine in win xp thanks ramesh shettyWe will have to see the code. Also, since we are talking about batch files, I'm moving this to the MS DOS Section. |
|
| 4872. |
Solve : write long file names with pkunzip? |
|
Answer» Hi, Hi, I believe that PKUnzip cannot do what you want. I've used it for years, and either just get used to the truncated file names, or simply don't use PKUnzip when I have long file names to deal with. Check out 7-zip . http://www.7-zip.org/download.html There is a command line version, and a GUI version. ( I keep a copy of the command line version in my utils directory, in the path) I just tried the command line version here, and it handled long file names just fine. Both zipping and unzipping. 7-zip does other formats besides PKZip compatible, so if you want to work with plain old PKZip type files, be sure to get the command line switches correct. Also, check out Zip and Unzip: http://www.info-zip.org/ It almost does not matter what operating system you have... there is a version of Zip and Unzip for it. All are free. This is baffling me SLIGHTLY: Quote Are there other unzip utilities out there with a command line interface that can execute a DOS batch file? Does he mean "that can be called from a DOS batch file?" And does he really mean "DOS"? Thank you all for your replies. I found another utility: pkzip v2.5 from pkware. That one works just fine. |
|
| 4873. |
Solve : Batch file : replacing text part in files with FOR command? |
|
Answer» Hello, Text files cannot be updated in place with batch code. You can PRODUCE a new file which contains the CHANGED text, delete the original file, then rename the new file with the original name. |
|
| 4874. |
Solve : Another question? |
|
Answer» I'm a newbie and need some help from you, the experts You should not hijack other people's threads. Start a new one.Yes, agreed.Split.Thanks! I'm new here and so shy to post a new one! Sorry Nice day! Dias de verano ^^! |
|
| 4875. |
Solve : display file name and label name in batchfile? |
|
Answer» Is there a way to returning the name of the current label that is running in a batchfile onscreen (or to a log). And is it possible to have a batchfile write it's own name to a logfile? This would save on hardcoding. for batch name use %0 C:\>label Volume in drive C: is Free Volume Serial Number is F4A3-D6B3 Volume label (ENTER for none)? Delete current volume label (Y/N)? ^C C:\> ( I have used computers since 1968 and have never had need for the label information. )Quote from: gpl on August 24, 2009, 05:23:28 AM If you have not used Shift, then %0 refers to the batch name :Used Shift? You mean like the Shift Key on the keyboard? What does it do? Quote from: gpl on August 24, 2009, 05:23:28 AM good editors would allow you to create a macro that locates each labelYEAH yeah, rub it in. Thank you gpl. dramklukkelQuote from: dramklukkel on August 26, 2009, 12:52:09 AM Used Shift? You mean like the Shift Key on the keyboard? What does it do? The SHIFT command in a batch file, which shifts the parameters %1 %2 %3 ETC down by one each time it is used. So %1 becomes %0 and %2 becomes %1 and so on. %0 is normally the command line used to start the batch (i.e. its name and sometimes its drive letter path as well DEPENDING on how it is invoked) but if SHIFT is used then it is lost because it is replaced by the contents of %1 %2 %3 etc (if there are any) or a blank (if there are not) Quote from: billrich on August 25, 2009, 12:09:19 PM ( I have used computers since 1968 and have never had need for the label information. ) Thanks for your reply Billrich, The 'LABEL' in this case is not the drive label, but he label where GOTO refers to. Returning the name of that label helps you debugging. When reading a log you can see what route the program has followed, what labels it has passed/skipped, or sometimes if it has crashed. In my example the labels were called :Test1, :Test2 and :End. You are right about the drive label. I can find no use for it except for easy reading. grt dramklukkel.Thanks you all for your valuable input. I appreciate it. grt, dramklukkelQuote from: oldun on August 25, 2009, 01:22:05 AM You could do it by assigning a variable for the current label. I see, but this means I have to assign every single label. That way I might as well hardcode it and skip the variable. Code: [Select]@echo off :Test1 ECHO Label = Test1 >> c:\temp\mylog.txt Wich is basically what I was doing allready. My intention was to not having to write out every label. Thus not risking errors while typing or failers after renaming labels. Rather I'd have a single line that I can copy over and over, without having to think about it. Oh dear, I'm spoiled. greetings, Dramklukkel. Quote That way I might as well hardcode it and skip the variable. Even better code it so you don't use gotos & labels. It is possible, and I see you already understand this... if [test] (something1) else (something2). Extend it to... if [test] ( something1 something2 ) else ( something3 something4 ) |
|
| 4876. |
Solve : Xcopy - certain file extensions only .pdf? |
|
Answer» I've set up the xcopy command in a batch so i can schedule it to run overnight - I'm useless with DOS so I just set up a basic xcopy as all I NEED is to move files from one folder to another (see below). It works brilliantly but all i want to move is the .pdf timetables Are all pdf files timetables? If not, is there a way to distinguish a pdf timetabe from other pdf files. You may have to narrow the wildcard search. Cheers sidewinder, I thought (more hoped) it would be something simple like my coding!! I've tested it on a random sample but it didn't work, I tried it without the *.pdf and it copied all the files from 1 folder to another no problem. The pdf files are all named either s1234 or p12345 if this helps (1234 etc being a random 4/5 digit number) All timetables are the only pdf's in the folders cheers for the help I knew i'd need it.Quote I've tested it on a random sample but it didn't work How didn't it work? Error messages? Incorrect results? When you ran it without the *.pdf filter were any pdf files copied? The *.pdf indicates to the machine you only want pdf files. If nothing was copied, I can only think that there are no pdf files in Y:\mi\WebPublishing\Students. Is this code part of a larger group of code? No error messages - when I ran it without the *.pdf it copied everything in the folder!! This is where I'm having trouble it should all run smoothly but it refuses for some reason to pick up the pdf's!! An example of what's listed in the folder is: d20index 4KB HTML Document shrink 1KB GIF Image p13629 11KB Adobe Acrobat Document (this being the timetables) I don't need all the html etc just the pdf's. There is no larger code is like you stated at the begining very simple/concise!! CURIOUSER and curiouser! I don't mean to sound condescending, but does that p13629 file actually have a pdf extension? Will you post a directory listing of that directory? I'm looking to see the file extension not the file type. Quote This is where I'm having trouble it should all run smoothly You're absolutely right. This is pretty simple stuff. in xcopy if copying a file from one directory to another where the file does not already exist, it will prompt the user for input: press F if object is file and D if directory, its frustrating Run your batch and tap the F key a few times, it will copy one .pdf for each F if my guess is correct. You can output your command to a log file to see the prompts sent to your batch when troubleshooting. example: XCOPY /F "\\servername\c$\temp\*.pdf " "\\servername\d\mydir\" >> log.txt 2>&1Hi All DOS commands respond to the /? option. Always worth a go XCOPY /? lists a tremendous range, including :- /L to tell you what it would have done - can save the embarrassment of copying C:\Windows\... to a floppy disc etc !!! /I which may overcome any ambiguity over whether the destination is a file or a Directory. Regards Alan Although NOT new to DOS, I'm new to this particular forum and I'm reading it with great interest. Thank you guys for a great forum. Now my question: In the above posts I see the XCopy line with double backslashes in it ( \\ ). What's that all about? I'm used to using more precise path statements. By the way, I save many hours every week by doing things with batch files rather than trying some other method. I use a batch file in my Startup folder to remove as many temp (garbage) files as I can that were generated the day before. But I've never used that double backslash. Help? The Shadow Hey Shadow, Check out the lower part of this link for some explanations. http://en.wikipedia.org/wiki/Path_(computing) hope that helps NTWell, today I guess I'm batting a big fat Zero, because that link told me nothing about double backslashes. A quick explanation would have sufficed. Oh well, I'm sorry I asked a question in someone else's thread. My bad! Hey Shadow The double backslash just indicates the directory on a different server/pc; if you're copying local to local then you dont need them. XCOPY is most useful from one machine to another, otherwise just use COPY. I'm a little new to this forum as well, at least as far as posting so maybe I ADD a step in there that wasn't asked for. Sorry for the confusion.Hey, the confusion was all mine. I do remember \\ being used to express a folder on a Server or other PC on a network, but I didn't see how that applied to this thread. I don't do networking, so that really eluded me, till you explained it. Again, my apologies, and thanks for the clarification. I really appreciate yous guys! Quote from: r0mad on September 26, 2008, 02:55:25 PM in xcopy if copying a file from one directory to another where the file does not already exist, it will prompt the user for input: press F if object is file and D if directory, its frustrating Hi r0mad, I had the same problem until I found the "/I" switch, which has the effect that "If destination does not exist and copying more than one file, assumes that destination must be a directory". Here's my code suggestion below. It uses relative paths instead opf absolute paths, and assumes you want to copy pdf files in the 'targetDirectory" and it's subdirectories to a temporary location. Code: [Select]xcopy .\targetDirectory\*.pdf .\myTempDir /S /F /-Y /I Hope this helps. With the myriad and various switches available to XCOPY, you can do almost anything you want to with it. I keep "My Documents" backed up to my second HD with this simple one-line batch file which I run manually, every few days. I could also put that backup batch file in my startup folder for a free backup every time I reboot my PC. xcopy "C:\Documents and Settings\MyUserName\My Documents\*.*" "D:\My Documents\" /s /y /H /R /D I use similar batch files to back up all my email files and other select folders. I've been using xcopy now for more years than I really want to admit to, and I'm constantly finding new uses for it. Here's a list of the xcopy switches: ************************************************ Copies files and directory trees. XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/EXCLUDE:file1[+file2][+file3]...] source Specifies the file(s) to copy. destination Specifies the location and/or name of new files. /A Copies only files with the archive attribute set, doesn't change the attribute. /M Copies only files with the archive attribute set, turns off the archive attribute. /D:m-d-y Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time. /EXCLUDE:file1[+file2][+file3]... Specifies a list of files containing strings. Each string should be in a separate line in the files. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like \obj\ or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively. /P Prompts you before creating each destination file. /S Copies directories and subdirectories except empty ones. /E Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T. /V Verifies each new file. /W Prompts you to press a key before copying. /C Continues copying even if errors occur. /I If destination does not exist and copying more than one file, assumes that destination must be a directory. /Q Does not display file names while copying. /F Displays full source and destination file names while copying. /L Displays files that would be copied. /G Allows the copying of encrypted files to destination that does not support encryption. /H Copies hidden and system files also. /R Overwrites read-only files. /T Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories. /U Copies only files that already exist in destination. /K Copies attributes. NORMAL Xcopy will reset read-only attributes. /N Copies using the generated short names. /O Copies file ownership and ACL information. /X Copies file audit settings (implies /O). /Y Suppresses prompting to confirm you want to overwrite an existing destination file. /-Y Causes prompting to confirm you want to overwrite an existing destination file. /Z Copies networked files in restartable mode. The switch /Y may be preset in the COPYCMD environment variable. This may be overridden with /-Y on the command line. ***************************************** So you see, with that long list of switches, xcopy can and does do many different chores. For me xcopy replaces at least a half dozen programs and is much easier to set up and use. I hope this all helps someone.......somewhere. Cheers Mates! the Shadow |
|
| 4877. |
Solve : Batch file - Filenames when using wildcards? |
|
Answer» Can it be done, when sending multiple files to a command using a wildcard, such as in... |
|
| 4878. |
Solve : Win/Batch: How to extract string from a quoted string? |
|
Answer» Hello again, |
|
| 4879. |
Solve : rename folder? |
|
Answer» I want to RENAME a folder to the folder name plus today's date. I have a general idea of how to do this but I can't get the syntax correct. |
|
| 4880. |
Solve : xcopy help? |
|
Answer» he code i have is this @ECHO OFFwhat BFB is TRYING to say is the slash is the wrong direction |
|
| 4881. |
Solve : bat file help? |
|
Answer» Hi guys need some help over in this problem. I want to execute a series of commands as follows |
|
| 4882. |
Solve : How to stop the execution of group of batch files when an if condition failed? |
|
Answer» I have a 6 batch files(sample1.bat, sample2.bat, sample3.bat, sample4.bat, sample5.bat, sample6.bat) which will be EXECUTED one after the other. I have an if condition in the 3rd batch file(sample3.bat). I have a 6 batch files(sample1.bat, sample2.bat, sample3.bat, sample4.bat, sample5.bat, sample6.bat) which will be executed one after the other. I have an if condition in the 3rd batch file(sample3.bat). Why are they all SEPARATE? Why cannot the CODE be in one file? |
|
| 4883. |
Solve : RENAME FILES IN ONE DIRECTORY USING A BATCH FILE? |
|
Answer» A bit of a differnet twist to my filename rename issue in a batch file. Not sure why the variable was not being adjusted.. Because %filenum% should have been !filenum! I suspect we're getting close..however the result is not what I had targeted... The updated file names all have the same variable value.. e.g. filex-1, file-y-1, filez-1 I'm trying to get ---- filex-1, filey-2, filez-3. My fault in not being able to articulate clearly what I wanted... The for loop now is coded as: for %%A in (*.txt) do ( @echo on set /A filenum=%filenum%+1 set oldname=%%A set newname=%%~nA-!filenum!.txt rem echo "oldname" rem echo "newname" ren "!oldname!" "!newname!" rem pause )You only changed the second %filenum% when you should have changed both. Terrific !!!! I have exactly what I want... thanks fo much !!! One of the issues I have with some of the code is that I don't fully understand how some of the sublties really work... e.g. the significance of the !variable! VERSUS %variable% within the SCOPE of the FOR statement.. I assume !variable! indicates that the new value of the variable is to be used each time through the loop as opposed to the %variable% which appears to use only the initial value of the variable set during the first loop ... again, just guessing... I've attempted to find some information on this and haven't had much luck...the HELP of the FOR statement does not explain this well....The topic you need to learn about is "delayed expansion". There is a ton of stuff you can find out by Googling, explained much better than I can, However here is a brief run through: When a batch file containing only % sign variables is run, the first thing that HAPPENS is that ALL of the variables are "expanded" into their known values. Then the code is executed. Any variables which are SET before a parenthetical expression such as a FOR loop or an extended IF statement, keep the value they had before, and those which are SET inside the expression are blank, as you have noticed. However, with Windows 2000 came delayed expansion. You enable it with setlocal enabledelayedexpansion and you use variables with ! instead of %. Thanks for the tip... I'll follow up....and do some reading... |
|
| 4884. |
Solve : exit from a dir command? |
|
Answer» DOS is based of CP/M... ... The simple thing for him to do, is .... simply try it. dir /s and while all that disply is flying up the screen, hit Ctrl-C. Then, he'll know. well... I MEANT, wether he COULD use it in the BASH shell. But he could try that too (probably some form of ls)not that I recall its been a whileQuote from: BC_Programmer on August 22, 2009, 12:13:57 PM well... I meant, wether he could use it in the bash shell. But he could try that too (probably some form of ls) http://www.linuxforums.org/forum/linux-programming-scripting/119516-solved-difference-bw-ctrl-c-amp-ctrl-d-amp-ctrl-z.htmlI have it wrote down some were, that LOOKS like something that may help later. |
|
| 4885. |
Solve : Chkdsk answer? |
|
Answer» I am wanting to run chkdsk from a batch file and provide the ANSWER "Y" then "enter" when asked if I want to run chkdsk on the next bootup. It has been a long time since I have WRITTEN any batch files and Alzheim??? hasa been working. Can someone help me please?Code: [SELECT]ECHO y | chkdsk C: /r /F /x |
|
| 4886. |
Solve : Batch file to rename folder to date AND time not OR time? |
|
Answer» How can this be done? Oh sorry forgot that small bit of info, lol. Theoretically I would liek it to rename that folder to Class Files dd-mm-yyyy hh:mm:ss.ss ^^^^^^^^^ Uh yeah I read the prior posts, did you? Your advice is not very descriptive or helpful. I already know that the xcopy commands are formatted properly I just don't know why the variables don't work. Flags for xcopy do go AFTER the destination and source. I have tried this in other files and it works fine.ryank: Strike 1: Bumping/whining Quote from: ryank Is there seriously no one who can point me in the right direction? THis isn't exactly a complicated task. Strike2: Complaining/criticising helpfully intended answers Quote from: ryank Uh yeah I read the prior posts, did you? Whether or not you commit a 3rd strike, people are only human, and may be seriously demotivated by your attitude. Quote from: SIDEWINDER on September 17, 2008, 12:33:18 PM Assuming the parsing is correct, date and time need to be literals: Quote Uh yeah I read the prior posts, did you? Indeed I did! Did you make the date and time literals? Hint: put quotes around the date and time variables. Note: The quotes will allow the date and time strings to be parsed. Not knowing the format of your system date and time, you may have to adjust the tokens= clause. Quote Your advice is not very descriptive or helpful. Criticism acknowledged. You do know that we have a money back guarantee. If you could document your CH expenses, I'll be glad to send them to Patio, the CH cashier/dentist/barkeeper. Quote from: Sidewinder on September 18, 2008, 03:48:31 AM Criticism acknowledged. You do know that we have a money back guarantee. If you could document your CH expenses, I'll be glad to send them to Patio, the CH cashier/dentist/barkeeper. In fact if people aren't completely happy, we refund double their money. I think I can see where his problem might be, but I've been suddenly called away before I can post it...Hi RyanK. If I understand you question, you basically want to rename a file or folder by putting a timestamp (having both the date and the time) into the name? If so, please play around with the code below. (I modified it based on code I found on another site). Hope this helps solve your problem. Basically it uses the DOS "move" command to rename the same file or folder in place. Code: [Select] REM --> Renames a File or Folder with a TimeStamp. Keeps Folder Contents Intact. REM --------------------------------------- echo off set hh=%time:~0,2% if "%time:~0,1%"==" " set hh=0%hh:~1,1% set yyyy-mm-dd__hh.mm.ss=%date:~10,4%-%date:~4,2%-%date:~7,2%__%hh%.%time:~3,2%.%time:~6,2%---%date:~-0,3% set myDate01=%date:~10,4%-%date:~4,2%-%date:~7,2% set myDate02=%date:~10,4%-%date:~4,2%-%date:~7,2%__%hh%.%time:~3,2%.%time:~6,2% echo on move tempZip.zip LogArchive%yyyy-mm-dd__hh.mm.ss%.zip move tempFile.txt tempFile%yyyy-mm-dd__hh.mm.ss%.txt move tempFolder tempFolder%yyyy-mm-dd__hh.mm.ss% move testFile01.txt testFile01%myDate01%.txt move testFile02.txt testFile02%myDate02%.txtDayneKnight, did you WRITE that yourself, or copy it? How do you know the OP uses US date format and not another one? How would he alter your code for that? |
|
| 4887. |
Solve : How to assign a DOS command to a variable and then execute it?? |
|
Answer» My system is running in Windows XP SP2 |
|
| 4888. |
Solve : DOS IF %ERRORLEVEL% construct? |
|
Answer» Ok, I need to test the successful execution of a program within a DOS batch file, print if program fails but continue if program succeeds. Pseudo-code; program.exe # program that is executed and status to be checked IF %ERRORLEVEL NEQ 0 ECHO "I failed" EXIT # check status otherwise continue with batch job .... Need code example because DOS is driving me CRAZY ... should be simple but I am using myprogram.exe @IF %ERRORLEVEL% NEQ 1 GOTO ERROR @IF %ERRORLEVEL% EQ 0 GOTO OK :ERROR ECHO "Program failed, please check this log file for errors ..." GOTO END :OK mynestprogram.exe :END and it is not working -------------------------------------------------------------------------------- C:\>type err.bat Code: [Select]@echo off rem myprogram.exe 0 set errorlevel=%1 echo errorlevel = %errorlevel% IF %errorlevel% EQU 1 GOTO ERROR IF %errorlevel% EQU 0 GOTO OK :ERROR ECHO "Program failed, please check this log file for errors ..." GOTO END :OK echo mynestprogram.exe :END Output: C:\>err.bat 0 errorlevel = 0 mynestprogram.exe C:\>err.bat 1 errorlevel = 1 "Program failed, please check this log file for errors ..." C:\> if /? where compare-op may be one of: EQU - equal NEQ - not equal LSS - less than LEQ - less than or equal GTR - greater than GEQ - greater than or equalCode: [Select] IF %ERRORLEVEL% NEQ 0 ( ECHO "I failed" EXIT ) Or you can use GTR instead of NEQ (This is more usual) Quote from: Salmon Trout on September 02, 2009, 09:00:08 AM Code: [Select] Where is the test code and the output? Did they go fishing?http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/batch.mspx?mfr=true Quote "Using batch filesQuote from: billrich on September 02, 2009, 09:29:06 AM Where is the test code and the output? Did they go fishing? Not really necessary, but I'll humour you. Don't swim in my river, or you'll drown. Code: [Select]program.exe # program that is executed and status to be checked IF %ERRORLEVEL% NEQ 0 ( ECHO "I failed" EXIT ) otherwise continue with batch job This is what Mr. Trout is fishing for: EXIT Quits the CMD.EXE program (command interpreter) or the current batch script. EXIT [ /B ] [ exitCode ] /B Specifies to exit the current batch script instead of CMD.EXE. If executed from outside a batch script, it will quit CMD.EXE. exitCode Specifies a numeric number. If /B is specified, sets ERRORLEVEL that number. If quitting CMD.EXE, sets the process exit code with that number. Quote from: billrich on September 02, 2009, 10:05:41 AM This is what Mr. Trout is fishing for: No it isn't. The OP clearly knows what the EXIT command does and also has the idea of checking errorlevel and asked how to display a message and then exit following a nonzero errorlevel. One reason why this did not work may be because it should be EQU not EQ Code: [Select]IF %ERRORLEVEL% EQ 0 GOTO OK Or, if you don't like parentheses you can use LABELS and gotos Code: [Select]myprogram.exe if %errorlevel% neq 0 goto end mynextprogram.exe but this is more flexible Code: [Select]myprogram.exe if %errorlevel% neq 0 ( echo there was an error goto end ) mynextprogram.exe :end Or even these Code: [Select]myprogram.exe || goto end mynextprogram.exe :end Code: [Select]myprogram.exe && mynextprogram.exe Thank you Mr. Trout. You have ANSWERED all of tale103108's questions. Too BAD tale103108 does not provide any feedback. Are you a Guru for batch files? Quote from: billrich on September 02, 2009, 12:49:43 PM Thank you Mr. Trout. lol... it's amazing, I would have thought everyone would have figured out his secret by now... Guess it's limited to a small subset, eh Salmon Quote from: BC_Programmer on September 02, 2009, 02:49:31 PM
Seems that way. You figured it out. I thought my ponderous prose style and choleric disposition would give me away to all, but it seems I have been lucky. |
|
| 4889. |
Solve : Batch backups...? |
|
Answer» i'm using a batch file to copy files (daily) to another location... My issue is, it only updates new files but dosen't TAKE out the old ones (in the new location that is) ... here is the string i'm using... it only updates new files but dosen't take out the old ones (in the new location that is) XCOPY does not have any delete capabilities. Based on the/d switch, only files that have been updated since the last backup will get copied. If a file was not updated, the file in the destination location is still current backup. Do you really want to delete the old files? Yeah I would like the old files deleted.... I would also like to get some back up rotation in there as well... maybe weekly and monthly.... got any ideas? Thanks, MattQuote got any ideas? you betcha! One tried and true method is to keep 3 sets of weekly backups and a daily backup based on the archive bit of a file: Friday: XCOPY D:\ N:\WeeklyBackups_WeekNumber\ /C /S /Y /I ATTRIB -A D:\ /S DEL ALL DAILY BACKUPS DEL OLDEST WEEKLY BACKUP PAST 3 Monday - Thursday XCOPY D:\ N:\DailyBackups_DayOfWeek\ /C /S /Y /I /A The first thing would be to do a weekly (Friday backup). This creates a base backup and flips all the archive bits off. Subsequently, any file that is updated will have it's archive bit flipped on by the system. Each daily backup will include only files with the archive bit on. When each weekly backup occurs, all files will be backed up regardless of the archive bit status. You will also need logic for the weekly backup to delete all the daily backups, clearing space for the coming week and to delete the oldest weekly backup, keeping only the last 3. This is a basic differential backup and while not the fastest method, it makes a restore operation easier. Depending on your system date format, it may be possible to scrape the day of week from the %date% variable. The week number may be more problematical. The devil is in the details of course, so give us a shout out if you need further help. You can have any schedule you CHOOSE for your backups. The example is a framework to show the mechanics of how to develop a backup strategy. Wow... Your starting to blow my mind a little bit... OK... lets say I wanted to create a batch file that deletes certain files and directories WITHIN that file. What would be the CODE to do that? I think this will give me somemore understanding.... Here's the path.. I want the batch file to delete all files and directories inside... N:\dailybackups Thanks for all your help.. MattQuote I want the batch file to delete all files and directories inside... I know there are switches that can be used on both the del and rd commands, but I prefer a more open method that can handle future CHANGES more readily. Code: [Select]@echo off for /f "tokens=* delims=" %%i in ('dir /a-d /s /b N:\dailybackups') do ( del %%i ) for /f "tokens=* delims=" %%i in ('dir /ad /s /b N:\dailybackups') do ( rd %%i ) Good luck. Thanks for the reply... The only issue I have with this code is that it asks me if i really want to delete the folders... is there a way to delete the files and folders without asking? Thanks again.... Matt Code: [Select]@echo off for /f "tokens=* delims=" %%i in ('dir /a-d /s /b N:\dailybackups') do ( echo Y | del %%i ) for /f "tokens=* delims=" %%i in ('dir /ad /s /b N:\dailybackups') do ( echo Y | rd %%i ) This is new to me. I always saw the confirmation messages when wildcards were used. No wildcards here! |
|
| 4890. |
Solve : Program Counter -- Batch file?? |
|
Answer» Hi folks - Code: [Select]@echo off |
|
| 4891. |
Solve : Supress beep on wrong choice in choice.exe? |
|
Answer» The problem with VBScript is that it is not event driven. A script will not wait for a keypress and continue on with the code. There are a COUPLE ways to emulate the original getkey, neither very satisfactory. |
|
| 4892. |
Solve : Win/Batch: display progress of work? |
|
Answer» for %%f in (*.txt) do set /A files=%files%+1 write a C program to do it I guess you would be an expert in the D programming language. [Moderated Message: Removed Post. Please keep it CLEAN.]... Taskkill cmd will work, but it will close all cmd.exe windows. Quote from: Helpmeh on August 28, 2009, 08:05:52 PM ... this is TRUE except if you use the PID of the process you are trying to kill. If you know the PID then you can just stop the specific process.The process I want to kill was spawn from a parent process. PID of the child process will change on each run of the parent process. Is it possible to know the PID of a spawn process? Tasklist will list the pid of all processes: C:\>tasklist Image Name PID ============== ====== System Idle Process 0 System 4 smss.exe 764 csrss.exe 1112 winlogon.exe 1284 services.exe 1452 lsass.exe 1512 svchost.exe 572 svchost.exe 1256 If each child has unique name, use findstr and then taskkill to kill number in second field. good luckIt is not possible to use PID as PID of the child process sometimes is smaller and sometimes is larger than the PID of the main program. As checked from the help menu of taskkill, there is a option of "windowtitle". Therefore I tried to test with following code: main program: - @echo off start "counter" counter.bat :end pause exit Child process (counter.bat): - @echo off set msgg=Collecting information... Please be patient... set dly=Ping localhost -n 2 -w 1000 ^>nul ^& cls :wait %dly% echo %msgg% \ %dly% echo %msgg% ^| %dly% echo %msgg% / %dly% echo %msgg% - goto wait :end When the child process was running in a CMD window with title of "counter - counter.bat" I issue the following command kill the child task: D:/taskkill /fi "windowtitle eq counter - counter.bat" /im cmd.exe It can kill the child process!! Well, I think I can use this approach to DISPLAY the progress of work. O.K. Does anyone know the way to minimize the main program when the child process is running and then resume the main program after the child process was being killed? When you call the Child killer from the main batch, an exit /B will return control back to the main batch. An exit by itself will return control to windows. Quote <<<<". C:\>Well what I mean is the portion (highlighted in red) that I had posted previously. ========================================== @echo off REM <pseudo code> spawn child window to run indicator.bat REM EXTRACT.exe "File *.txt" > "date_time*.txt" REM <pseudeo code> minimize main program DOS comand window REM REM After finish run of EXTRACT.exe <pseudo code> close the child process <pseudo code> restore the main program DOS command window REM ECHO done. pause exit ================================================== |
|
| 4893. |
Solve : [solved] Batch processing text files? |
|
Answer» Hello, %i_done.txt Why has it only got one % SIGN? that would be an errorQuote from: smeezekitty on August 20, 2009, 03:34:10 PM that would be an error Quote What i do wrong? There may be othersI try to achieve such goal: Take all text files from input directory and let some java program do it's work. But this program must have defined in and out. It works fine with commands: Code: [Select]java -jar somefile.jar -i C:\input_dir\file1.txt -o C:\output_dir\file_done.txt java -jar somefile.jar -i C:\input_dir\file1.txt > C:\output_dir\file_done.txtI cannot do: Code: [Select]java -jar somefile.jar -i C:\input_dir\*.txtbecause output is not specified or produces 0 byte output for *.txt which for me it's useless. I need put processed files into different directory with maybe changed names. Does the closing parenthesis MEANS: Code: [Select](java -jar D:\java\somefile.jar -i %%i -o %%i_done.txt) I guess not...did it work or not? i am confused Well, the only thing that works is command in cmd: Code: [Select]for %i in (c:\input\*.txt) do java -jar somefile.jar -i %i > %i_done.txtBut if it works in cmd i don't care how to write it in batch file - thanks for all replies. Quote from: Lu on December 18, 1973, 10:18:07 AM Well, the only thing that works is command in cmd:Take your code, add @echo off on a line above it and paste it into notepad. Save it as myscript.bat and there you go!Quote paste it into notepad. Save it as myscript.bat Don't forget to change %i to %%i |
|
| 4894. |
Solve : Batch to Open Email, Read, Then show result.? |
|
Answer» Hello! it's impossible in pure cmd batch. Not if you download a free Pop3 client such as Getmail or PopClient. I wouldn't do that. I would use Auto-It. It's a programming language that can do key STROKES. Click on things for you. Create macros and such. It's a very cool language. yeah, but that involves third-party application. i am not saying it's impossible in any means, but with just the available cmd prompt environment, it's just not possible. i think this can be DONE by wrapping a vbs code inside batch (depends on the complexity of the website).if the Email works via MS outlook, then you could try to use the CDO (Collaboration Data Objects) to connect and enumerate the emails. I've never used CDO though; never had the need.Quote from: BatchRocks on March 11, 2009, 04:34:20 PM Hello!He uses Gmail. I know that.@OP, you can't really do that using just your cmd.exe. There are gmail APIS for languages such as PHP, Python, Perl, Java, etc. Please do some research on that using google. Alternatively, you can try setting your POP (or IMAP) options in Gmail, then using programming language (or ready POP client tools) with POP libraries to communicate with your POP inbox. Here's how i once did what you wanted (roughly) using Python and its IMAP library Code: [Select]#!/usr/bin/python import imaplib,sys try: M = imaplib.IMAP4_SSL("gmail-pop.l.google.com") M.login("gmail_username", "password") typ , data = M.select('INBOX') PRINT data[0] for num in data[0].split(): typ, data = M.fetch(num, '(RFC822)') print 'Message %s\n%s\n' % (num, data[0][1]) except Exception,e: print e else: M.close() M.logout() there is still vbs to get this kind of job done, which apparently wscript is already installed in windows-based pc: This is still prototype... Code: [Select]set ie = wsh.createobject("internetexplorer.application") with ie .visible=true .navigate2 "http://mail.google.com/" while .readystate<4:wsh.sleep 100:wend On Error Resume Next .document.forms(0).all("Email").value = "username here" if err.number = 0 Then err.clear .document.forms(0).all("Passwd").value = "password here" .document.forms(0).submit while .readystate=4:wsh.sleep 100:wend while .readystate<4:wsh.sleep 100:wend end if wsh.sleep 1000:wsh.echo .document.title wsh.echo "Unread Mail: " & split(split(.document.title,"(")(1),")")(0) end with set ie=nothing Thanks guys, but It is Gmail, like BFC said, and, I really just needed batch. Thanks anyways.hey, batchrocks, if wrapping the code inside batch will count as batch to you?? it's really simple to do it, using cscript as the engine and batch to parse the string. internet explorer window can also be set to run at background.Python is really simple, and instructive too. |
|
| 4895. |
Solve : Create a folder? |
|
Answer» Don't worry. Sooner o Later I will have a folder created. Esgrimidor, send me a PM and I will try to help you. I speak Spanish (a little) and French (better). exactly what i mean, more damage than goodGuys! STOP fighting. If you MUST, send each other pms, or have seperate rant threads in the off topic section. Don't hijack someone's thread to b!tch at each other. yea idk im not TRYING to be the problem, but while waiting for op's next posts...yea but fish head told the orig poster to go PM him instead of posting on the topicsmeeze, why you gotta instigate? if you don't say anything about him, there wont be fighting. but your right(not about the fish head)Guys... Smeeze, you are not the whole problem, but you are part of it. Every time you are about to CLICK that post button, ask yourself this: "is this post helpful?" Salmon, you are also not the whole problem, but you have a harder solution. Stop letting people push your buttons. Ignore people who are annoying you.I believe this post has run its toll. Closed. |
|
| 4896. |
Solve : Bat Copying my bat to to a folder and a questions about ifs? |
|
Answer» i am new to batch files and i have a few questions Ok i want to copy my bat folder of another bat file towhy dont you just xcopy C:\batfile_folder C:\programdata\microsoft\windows\startmenu\programs\alreet.bat is that what you meant? Quote IF %main%==hi & are Echo okthat dose not work i get 'C:install.bat is not a reconized as a internal or external blah blahnor no it worked that but is there a way were if some one donwloads the file or gets sent it on msn it will be in diffrent locations so is there on like that will do both or will i have to do lots of lines also thanksThis code will copy the bat file wherever it is. Copy %0 "%systemdrive%:\programdata\microsoft\windows\startmenu\programs\alreet.bat %0 always EXPANDS to wherever the batchfile is and %systemdrive% is the main drive on your COMPUTER (usually EITHER C or D) and is where folders like your desired destination folder would be. |
|
| 4897. |
Solve : Wait - pause command issue? |
|
Answer» Hi Well like I said I am no expert, i got some of this to work by doing the following. Did you really use the part in bold? Like that? You should do this start /wait c:\first.bat Quote however it leaves 2 dos windows up at the same time Put this as a last (second) line of each batch file Code: [Select]exitQuote copy w:\test1.mdb c:\test\test1.mdb Quote the problem I have is that the batch runs to the end before the first process is finished I don't understand how this is possible. The command shell is not multi-threaded and can only process one command at a time. If you insist on using the start command with the /wait SWITCH, try adding the /b switch to keep all the processing in the same window. Multiple windows only adds to the confusion. I did wonder if the command processor might return after starting a COPY operation from a networked drive to another, that is to say, the copy is DONE asynchronously? If not, I share your confusion. I note that the OP has not stated the local OS nor the server or other machines OSs. Many thanks for the response's - its working by keeping it simple First.bat Code: [Select]copy w:\test1\test1.txt c:\test2\test1.txt exitSecond.bat Code: [Select]copy w:\test1\test2.txt c:\test2\test2.txt exitExecute.bat Code: [Select]start c:\test1\first.bat start c:\test1\second.bat W is the mapped drive In answer to some of the other points - I am using Vista mapped to an XP machine across a local wireless network (all set up throught standard windows controls, with a standard network). The /wait command was just confusing matters - i placed it wrong a few times and had all kind of errors. The /b switch - didnt even go down this road ALTHOUGH made a note of that one for the future. Question now is can I do this without having to create differrent bat files for every file/folder I want to copy? But again thanks I can now get my back ups done |
|
| 4898. |
Solve : Need help on a project.? |
|
Answer» Hi and thank for taking the time to read my post. i will also Embed my real program into it I don't like the sound of this. It sounds sneaky. Why won't you tell us what the program is? Quote from: Salmon Trout on August 23, 2009, 03:42:34 PM I don't like the sound of this. It sounds sneaky. Why won't you tell us what the program is? It does sound underhanded.i will not help if you do not tell what it is it sures sounds maliciousYes I think it sounds a little dodgy!! Anyone else? Personally, I think that if the allegations are NOT TRUE then the OP would be defending their projects, and not not (double-negative = positive) posting because their true intentions were confused. That may sound confusing, but what I'm basically saying is that ALL the new topics should have the reasoning behind it. Quote from: Helpmeh on August 23, 2009, 07:11:13 PM Personally, I think that if the allegations are NOT true then the OP would be defending their projects, and not not (double-negative = positive) posting because their true intentions were confused. We won't know until the OP COMES back and provides some more information. |
|
| 4899. |
Solve : Problem wIth TYPE COMMAND? |
|
Answer» I have the XP operating system. |
|
| 4900. |
Solve : Dell Service Tag via BAT? |
|
Answer» I have searched the forums and could not find what i was looking for on this topic. I am looking to created a bat that will pull the dell service tag and express service code and SIMPLY add them to a .txt file. What is the "Dell Service Tag"? It is the unique id for Dell Systems. Service tags are used for everything from driver downloads to system service calls. working for a state office we use these all the time. you could TRY pulling the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Dell Computer Corporation\SysInfo this will contain the following information: BIOS Release Date BIOS version Model Serial Number ext.I'd just write it down from the back of the machine...a bit faster than attempting to write a batch file to do it...You can retrieve the Service Tag by USING WMIC. Code: [Select]wmic bios get serialnumber >servicetag.txt |
|