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.
| 7001. |
Solve : Could I run these commands in CMD in Windows 7?? |
|
Answer» I want to follow this one guide and I am going to provide the link to the guide. I use Windows only and don't use any other OS like Linux. This guide is using the commands on Linux, but once done transferring the work to Windows. My questions are, could I enter the same exact commands in CMD in Windows 7 instead of using Linux? |
|
| 7002. |
Solve : Boot.ini? |
|
Answer» How can I disable 'BOOTSAFE' in Boot.ini from DOS? Safe MODE does not work.Quote How can I disable 'BOOTSAFE' in Boot.ini from DOS? Safe mode does not work. It should work. Something else is seriously wrong. Additional information and help with the boot.ini F8 would GET me to the options menu but when I selected 'SAFE MODE' it just LOOPED back to the menu, so I CHECKED the 'SAFEBOOT' box in 'BOOT.INI' and now I cant get out of the loop.ok nevermind i GOT thenks for your help |
|
| 7003. |
Solve : Extract tags from filenames - how to? |
|
Answer» How do you extract the tags from filenames? I wanting to iterate through a folder of image filenames, SENDING the filename and associated tags to a TEXT file. I can't find any references to EXTRACTING file properties such as tags. |
|
| 7004. |
Solve : TCP IP Network? |
|
Answer» 1. My GOAL is to install windows os through LAN ... 1. Networking software for DOS and Windows 3.x 2. At C:>, TYPE ver If you have to ask #2, how will you will figure out #1? |
|
| 7005. |
Solve : Upload DOS command? |
|
Answer» Hello, |
|
| 7006. |
Solve : send files over an serial port? |
|
Answer» Hello, The short answer is no, the computer cannot communicate over the serial port without an OS loaded. My english is verry bad. But I think that you want to know wath I want to do. Its for my work. We must install many files on a computer from a machine. So I would do this with a bat file. It was easy for me to not install dos with diskettes. |
|
| 7007. |
Solve : net use... when to use it? |
|
Answer» I am slowly BEGINING to understand the SYNTAX of the NET USE command... when do you use it? Before you boot the COMPUTER... as in the autoexec.bat or before you load a DOSS program. I am hopefull that you can use it just before you load your program. |
|
| 7008. |
Solve : Set Mapped Drive Equal to Variable? |
|
Answer» In one of my scripts there is a command to map a network drive to the next available drive letter. I'd like to create a shortcut to this drive mapping on my desktop. To do this I thought about setting the drive mapping equal to a variable that I COULD then POP into a VBScript that creates the shortcut. |
|
| 7009. |
Solve : More than 9 "%" variables in batch file? |
|
Answer» Salmon Trout, REM Now parse out the LOCATION using a list Of course that comment should read "parse out the department" (this is what the code actually does) The application I'm using is call MarkVision. It is a Lexmark application for monitoring printers and such. I'll take a look at the suggestions posted and let you know what I find. I APPRECIATE all the help so far in this. The other way I could remedy this is by making sure all printers have a TWO work identifier like "conference room". But as I expand this alert ability out I know I'm not going to be able to keep that up. I'll be back in touch.Salmon Trout that is AWESOME. It worked like a charm! The only hang up is if the "Department" is off just a little bit on the printer and not defined that way in the script. Then the information outputted is not quite correct. But this would just be a environment management task for me and something I can show to my techs why they need to put in the information correctly. Thanks for all the help! |
|
| 7010. |
Solve : Close a program with CMD? |
|
Answer» Hi there, I'm BUILDING a batchfile for printing some PDF-files and some other stuff. And I was wondering, is there a command to close a running progress? something LIKE "Close <>.exe" |
|
| 7011. |
Solve : Setting up an "array" of files in a batc? |
|
Answer» I have a bunch of files with a .a extension. They are located in various subdirectories (nested various levels deep) off my current directory. I can list the files by executing the command 'dir /s *.a' to recurse through the directory STRUCTURE. What I'd like to do |
|
| 7012. |
Solve : how to change xls files that have specific seequens of caracters with batch file? |
|
Answer» hello, i work with hebrew caracture so fisrt come the subject then the name of the city When you ask for free help, you really should give accurate details about the task. I don't know how cmd handles Hebrew characters.I think what I would do is make a file with a list of the city names. One city per LINE. Use a for loop to parse that list and match that to the files in your directory and do a rename of the files. But then what are we supposed to do if you have two files with the same city name within a LARGER file name?its not possible to have two files with the city name in the same folder. foxdirve im new in this forum, will try to be more accurate in my questions. [recovering disk space, attachment deleted by admin]You are using Unicode formatting in the text file and unicode characters can be a huge problem for batch. Or at least I am totally unfamiliar with good ways to handle them. The last time I dealt with some unicode I had to resort to a VBS script. It will be interesting to see if anyone has some ideas...Quote from: foxidrive on March 16, 2014, 03:10:09 AM You are using Unicode formatting in the text file and unicode characters can be a huge problem for batch. Or at least I am totally unfamiliar with good ways to handle them. I ran a quick test, and I'm relatively sure you will have to resort to VB script. Code: (cmd) [Select]T:\>type cities.txt ?????? ????? ?????? ??? ??? ???? ????? ???? ????? ??? ?????? ??? ???? ???? ??? ????? ????? ????? ??? ?? T:\>type cities.txt >end.txt T:\>notepad end.txt T:\> Code: (end.txt) [Select]?????? ????? ?????? ??? ??? ???? ????? ???? ????? ??? ?????? ??? ???? ???? ??? ????? ????? ????? ??? ?? |
|
| 7013. |
Solve : auto answering autoexec.bat? |
|
Answer» Does any one RECALL how to GET the autoexec.bat to auto answer any questions that COME up so that the BOOT prosses can be fully automated? |
|
| 7014. |
Solve : ms dos help? |
|
Answer» I need open a 470,000kb file in Ms-DOS editor, but the editor opens the first 65,280lines and I couldn't read the further LINES. The file is a result of a program and this file is a read-only file. |
|
| 7015. |
Solve : Problem Formatting C Drive? |
|
Answer» I am trying to format the c drive on my windows 98 computer. After I type "format c:" at the command prompt, I get a message saying "Format cannot run because the volume is in use by another process. Format may run if this volume is dismounted first. WOULD you like to FORCE a DISMOUNT on this volume?" Then when I type "y", i get "Cannot Lock the drive. The Volume is still in use". I am really confusedQuote I am trying to format the c drive on my windows 98 computer. After I type "format c:" at the command prompt, I get a message saying "Format cannot run because the volume is in use by another process. Format may run if this volume is dismounted first. Would you like to force a dismount on this volume?" Then when I type "y", i get "Cannot Lock the drive. The Volume is still in use". I am really confused So this is not DOS, but a command prompt from within WIndows? BIG DIFFERENCE. Boot from a DOS boot disk and try again. |
|
| 7016. |
Solve : DOS program won't open after changing size? |
|
Answer» Okay, I'll bookmark this page and POST results. Thanks for all the help!Okay a bit of a break through! kind of...So I logged into a different username on the same computer that the DOS program wouldn't work on and it worked just fine under another username! So it works with no problems when I switch usernames but when its on the username that changed the size of the DOS window it won't work! Does this give you any ideas on what it could be? I just want it to work on this username the same as it does on the other one that didn't change any sizes of the DOS program. Thanks a lot for all the help so FAR and quick responses!Okay I resolved the issue thanks for all the help! I went to the BM3.exe file, right clicked it, and I unclicked "close on exit". this gave me an error message and paused the application. I was going to search for the error message but I was like HEY wait I'm still in the program its just paused. So I clicked the top left CORNER of the screen, chose Properties, chose Layout, and made the sizes default (W 80 H 25) and chose to save it to all applications with that name or something. Anyways that did the job! Thanks for the help peace! |
|
| 7017. |
Solve : Creating a game!? |
|
Answer» This will show everything you need for ATLEAST a intermediate game, from basic skills to sound! Sets the default console foreground and background colors.This way you could do: Code: [Select]color cc if errorlevel==1 goto colorerror :colorerror echo Attempt to set color values same > gamelog.log--INTERMEDIATE-- So you want sound, eh? SNDREC32 /PLAY /EMBEDDED C:/game/battle.wav C:/game/battle.wav can be any audio file. -This is a ongoing development. Help can be added or edited by me at any time.- Quote from: simplyTechy100 on March 08, 2014, 06:47:12 PM Use the color command.This way you could do: Just a comment re the code above - I didn't read most of your code as it is a wall of TEXT and quotes, and hard to read. The two lines in the middle of your code above will do nothing. For future reference, a number of websites haven games written in scripts. And there are tutorials about writing such kind of things. Here is none of many: How to Make a Large Game With Batch Script Quote from: foxidrive on March 09, 2014, 12:26:44 AM Just a comment re the code above - I didn't read most of your code as it is a wall of text and quotes, and hard to read.Cmon, look at this lil snippet from the help.txt! Quote from: C:/Users/-----/Desktop/help.txt The COLOR command sets ERRORLEVEL to 1 if an attempt is made to executeQuote from: simplyTechy100 on March 13, 2014, 05:21:06 AM Cmon, look at this lil snippet from the help.txt! What will your code do if it is not errerlevel 1? Exactly the same as if it is errorlevel 1.Eh.. I should have added a :1... OK, this is it.. Just put a :1 at the start if you used my method of detecting COLOR errorlevel. |
|
| 7018. |
Solve : How I know if partition exists?? |
|
Answer» Hi my friends, |
|
| 7019. |
Solve : How do u send a batch file? |
|
Answer» once you creat a batch file how do you send it to someone else without email or AIM ? this probobly sounds really dumb but im new at thisA floppy disk and a postage stamp. |
|
| 7020. |
Solve : Filenames? |
|
Answer» HI, currently i am using a BATCH file to call ANOTHER batch file. I have used the follwing command: call C:\Data\Sales DELIVERY MySQL\combine.bat However, there are spaces in between the filename of Sales Delivery MySQL folder. What should i put in between the filename so that i am able to run the file sucessfully?ENCLOSE the path/filename in double quotes e.g. "C:\my program\prog01.exe" |
|
| 7021. |
Solve : MS-DOS trouble with adobe photoshop? |
|
Answer» when I try to install adobe photo shop it says |
|
| 7022. |
Solve : Need to bypass schools site restrictions? |
|
Answer» created a .bat file but DOESNT allow "/" to be put in |
|
| 7023. |
Solve : Major Dos problems! need help !? |
|
Answer» alright WELL when im in my PROMPT and i try and change directorie to any directory that is more htan one word it says Too many parameters for example : |
|
| 7024. |
Solve : batch file logging windows 7 home how to question? |
|
Answer» Squashman Thank you for that link. I see the instructions all over the place. but i found that it does not seem to be that easy. not all windows 7 home threw ultimate are alike. thank the venders( hp, dell, etc ) maybe even windows microsoft. you make these settings and even on a reboot or hard boot nothing happens. not always anyway. i hear some are successful. not me i am not one of them. so i did a little more digging and found out were the main files are located and one stuck out like a sore thumb. imageres.dll. also in the imageres.dll file is were you can change the wallpaper, start-up sound that is unavailable, and most if not all the icons windows uses. there is even some PROGRAMMING in there, i have yet to figure out. guess its a matter of time before i figure it out. i am just learning batch and "logging" while honing in on how to change that wallpaper for the logon. thank you for your info and time.Quote from: snowcatman on MARCH 11, 2014, 06:54:59 AM din't know if you noticed. but this is not the wallpaper on you work space that i am changing. it's the wallpaper on your "logon screen" that i am changing. Oops. No, I didn't notice at all. Mea Culpa. Quote from: Squashman on March 11, 2014, 05:46:44 PM Seems like it would be a lot easier to do this. You could script this as well but you would still get UAC prompts. From Squashmans's link there is this, which may apply to your case too. Quote Two other things to keep in mind: First, the actual file size of backgroundDefault.jpg cannot exceed 256 KB. Second, you'll want to use an image whose dimensions match the screen resolution that you are using. If you use a file whose dimensions are smaller, the image will be stretched and may appear distorted.foxidrive Thank you for pointing that out. I already knew this information. Quote from Squashmans's link Two other things to keep in mind: First, the actual file size of backgroundDefault.jpg cannot exceed 256 KB. Second, you'll want to use an image whose dimensions match the screen resolution that you are using. If you use a file whose dimensions are smaller, the image will be stretched and may appear distorted. i should have stated it in a clearer way earlier. again Thank You. P.S. there are plan's in the iron work down the road that will address and implement all the different screen resolutions. that are in the imageres.dll file. again thank you..Back to how: batch file logging windows 7 home how to question ================================================ all this in owner administrator i find in my log: script piece used: >>"%~dp0\temp\error.log" 2>&1" copy "imageres.dll" "%windir%\system32\imageres.dll" /y error --> The filename, directory name, or volume label syntax is incorrect. when i go to a cmd: access using admin rights copy "imageres.dll" "%windir%\system32\imageres.dll" /y error --> Access is denied in the consel: batch ran with admin right >>"%~dp0\temp\error.log" 2>&1" copy "imageres.dll" "%windir%\system32\imageres.dll" /y I don't see any error! anyone have anymore about logging while i look at way i am getting these errors. thank you for you time and effort in advanced. here is what i have changed so far. i change a few thing and did a little more orginizing. really not too much of a change ==================================================================== @rem logonwallpaper.bat @ECHO OFF if not exist "%~dp0\temp" mkdir "%~dp0\temp" @rem i will, or may move this to reflect on the choices of the users. may raname this file 1>>"%~dp0\temp\error.log" echo -------------------------begining of batch script------------------------- 1>>"%~dp0\temp\error.log" echo ========================================================================== 1>>"%~dp0\temp\error.log" echo started personal branding script year%date:~-4,4%,day%date:~-7,2%,month%date:~-10,2%,time%time:~-11,2%,%time:~-8,2%. CLS ECHO For windows 7 home threw ultimate echo. ECHO WARNING: YOU Can not just be administrator. ECHO You need to exit and start this ECHO file with OWNER ADMINISTRATOR privileges. ecHO The one you unhide and secured right? ECHO You also need to start the patch file with ECHO administrator privilages. ECHO If you already have just countinue. ECHO Thank You echo. ECHO Press ctrl and c to quit ECHO AND THEN "Y" or echo Press Anykey to continue ECHO if you did. thank you. PAUSE > NUL :MENU CLS ECHO ============= MENU NAME ============= ECHO ------------------------------------- ECHO 1. READ ME FIRST ECHO ------------------------------------- ECHO 2. Set Logon Wallpaper ECHO ------------------------------------- ECHO 3. Selection 3 ECHO ------------------------------------- ECHO 4. Selection 4 ECHO ------------------------------------- ECHO 5. Selection 5 ECHO ------------------------------------- ECHO 6. Selection 6 ECHO ------------------------------------- ECHO 7. Selection 7 ECHO ------------------------------------- ECHO 8. Selection 8 ECHO ------------------------------------- ECHO 9. Selection 9 ECHO ------------------------------------- ECHO ==========PRESS 'Q' TO QUIT========== ECHO. SET INPUT= SET /P INPUT=Please select a number: IF /I "%INPUT%"=="1" GOTO Selection1 IF /I "%INPUT%"=="2" GOTO Selection2 IF /I "%INPUT%"=="3" GOTO Selection3 IF /I "%INPUT%"=="4" GOTO Selection4 IF /I "%INPUT%"=="5" GOTO Selection5 IF /I "%INPUT%"=="6" GOTO Selection6 IF /I "%INPUT%"=="7" GOTO Selection7 IF /I "%INPUT%"=="8" GOTO Selection8 IF /I "%INPUT%"=="9" GOTO Selection9 IF /I "%INPUT%"=="0" GOTO Selection9 IF /I "%INPUT%"=="q" GOTO Quit CLS ECHO ============INVALID INPUT============ ECHO ------------------------------------- ECHO Please select a number from the Main echo Menu [1-9] or select 'q' to quit. ECHO ------------------------------------- ECHO ======PRESS ANY KEY TO CONTINUE====== PAUSE > NUL GOTO MENU :Selection1 cls echo. 1>>"%~dp0\temp\error.log" echo started selection 1 reading the read.me year%date:~-4,4%,day%date:~-7,2%,month%date:~-10,2%,time%time:~-11,2%,%time:~-8,2%. @rem start notepad.exe read.me echo "read.me", "%~dp0" foo echo. echo thank you. echo Press Any Key when done Reading! echo. PAUSE > NUL Goto Menu :Selection2 @rem =======begin script UAC PARTUAL DISABLE needed by imageres.dll============= cls 1>>"%~dp0\temp\error.log" echo ----------------------------------------------------------------- 1>>"%~dp0\temp\error.log" echo started selection 2 change logon wallpaper %date:~-4,4%,%date:~-7,2%,%date:~-10,2%,%time:~-11,2% : %time:~-8,2%. echo processing starts echo. 1>>"%~dp0\temp\error.log" echo. echo press anykey PAUSE > NUL @rem =======begin script UAC PARTUAL DISABLE needed by imageres.dll============= echo SET UAC TO DISABLE. To help move imagerers.dll in future may need ECHO to use reboot to make it better. @rem note: foxidrive noted; I did see that you seem to be trying to disable UAC and that hasn't been @rem possible by command line to date. There is no way to programmatically disable UAC at this point in time. @rem selfnote. i only want some of the processes to leave imageres.dll alone. not to fully disable UAC @rem future note, may need to fully disable UAC. need to think on how to go about returning to script after reboot for that. 1>>"%~dp0\temp\error.log" echo uac temp disable >>"%~dp0\temp\error.log" 2>&1 "%windir%\System32\reg.exe" ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f ECHO. 1>>"%~dp0\temp\error.log" echo. echo press anykey PAUSE > NUL @rem =======end script UAC PARTUAL DISABLE needed by imageres.dll============= @rem =======begin script kill processes needed by imageres.dll============= cls ECHO KILLING PROCESSES NEEDED FOR Modifying imageres.dll 1>>"%~dp0\temp\error.log" echo KILLING PROCESSES NEEDED FOR Modifying imageres.dll @REM need to make this an if statement if process is running kill it other wise next @rem for everyone else if you know how to kill processes depening on a curent dll file i would like to know how. thank you. >>"%~dp0\temp\error.log" 2>&1 %windir%\system32\taskkill /f /IM "taskmgr.exe" >>"%~dp0\temp\error.log" 2>&1 %windir%\system32\taskkill /f /IM "explorer.exe" >>"%~dp0\temp\error.log" 2>&1 %windir%\system32\taskkill /f /IM "rundll32.exe" >>"%~dp0\temp\error.log" 2>&1 %windir%\system32\taskkill /f /IM "procexp64.exe" ECHO. 1>>"%~dp0\temp\error.log" echo echo press anykey PAUSE > NUL @rem =======end script kill processes needed by imageres.dll============= @rem =======begin script Take Ownership of imageres.dll============= cls echo Take Ownership of imageres.dll 1>>"%~dp0\temp\error.log" echo taking ownership of imagers file >>"%~dp0\temp\error.log" 2>&1 %windir%\system32\TAKEOWN /F "%windir%\system32\imageres.dll" >>"%~dp0\temp\error.log" 2>&1 %windir%\system32\ICACLS "%windir%\system32\imageres.dll" /GRANT Administrators:F @rem don't know were i got this or if it is needed but it is here for now. @rem think when cleaning up script i will test its need. >>"%~dp0\temp\error.log" 2>&1 SET __COMPAT_LAYER=WINXPSP3 ECHO. 1>>"%~dp0\temp\error.log" echo echo press anykey PAUSE > NUL @rem =======end script Take Ownership of imageres.dll============= @rem =======begin script Make Backup of imageres.dll============= cls echo Make back up of imageres.dll 1>>"%~dp0\temp\error.log" echo make a backup of imageres file >>"%~dp0\temp\error.log" 2>&1 copy "%windir%\system32\imageres.dll" "%windir%\system32\imageres.dll_%date:~-4,4%%date:~-7,2%%date:~-10,2%%time:~-11,2%%time:~-8,2%.old" echo make backup from source attempted ECHO. echo press anykey PAUSE > NUL @rem =======end script Make Backup of imageres.dll============= @rem =======begin script Move of imageres.dll to working directory============= cls echo Copy imagerers file to folder 1>>"%~dp0\temp\error.log" echo copy imagers to local folder >>"%~dp0\temp\error.log" 2>&1 copy "%windir%\system32\imageres.dll" "%~dp0\" echo attempted copy imageres file to this folder ECHO. echo press anykey PAUSE > NUL @rem =======end script Move of imageres.dll to working directory============= @rem =======begin Clear attributes of imageres.dll to working directory============= @ i am questioning why i am doing this part of the script? cls Echo Clear attributes of imagers file in system folder 2>>"%~dp0\temp\error.log" %windir%\system32\attrib -r -s -H "%windir%\system32\imageres.dll" pause echo attrib changed attempted ECHO. echo press anykey PAUSE > NUL @rem =======end Clear attributes of imageres.dll to working directory============= @rem =======begin overwrite of imageres.dll to locol directory============= cls echo Overwrite image to local file echo. @rem the point of this process is to take the picture suplied by the user and ably it to imageres.dll echo this may take some time pending on you computor processing power echo is and your usb and/or drive speed is. maybe all the above. 1>>"%~dp0\temp\error.log" echo begin convert of imageres.dll file set path=%path%;%~dp0 >>"%~dp0\temp\error.log" 2>&1 echo %cd% 1>>"%~dp0\temp\error.log" echo. >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5031, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo . >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5032, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo .. >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5033, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ... >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5034, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo .... >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5035, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ..... >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5036, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ...... >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5037, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ....... >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5038, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ........ >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5039, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo .........["25%"] >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5040, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo .......... >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5041, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ........... >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5042, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ............ >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5043, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ............. >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5044, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo .............. >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5045, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ..............."50%" >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5046, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ................ >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5047, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ................. >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5048, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo .................. >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5049, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ................... >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5050, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ...................."75%" >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5051, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ..................... >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5052, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ...................... >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5053, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ....................... >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5054, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo ........................ >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5055, >>"%~dp0\temp\error.log" 2>&1 copy "imageres1.dll" "imageres.dll" /y echo........................ >>"%~dp0\temp\error.log" 2>&1 ResHacker.exe -addoverwrite "imageres.dll", "imageres1.dll", "wallpaper.jpg", image, 5056, echo ........................."100%" ECHO. echo press anykey PAUSE > NUL @rem =======end overwrite of imageres.dll to locol directory============= this is were i am haven issues @rem =======begin Copy of modified imageres.dll to working directory============= cls echo OverWrite or Copy modified imageres file back to systems folder @rem need to make an if then statment that if not replace old file with new file then show error. or take certon actions. @rem OK, OK. I LOOKED AT THIS AND IT SEEMS THE RIGHT WAY TO MOVE A FILE. @REM BUT IF THE SYSTEM DOES NOT LET LOOSE OF IT THE COMMAND HAS NO CHOICE BUT TO GIVE ERROR. @rem i wounder if there is a time limit to when i can modify the file??? 1>>"%~dp0\temp\error.log" echo copy back modified emageres.dll file >>"%~dp0\temp\error.log" 2>&1" copy "imageres.dll" "%windir%\system32\imageres.dll" /y echo copy attempt of imageres file back to system folder ECHO. echo press anykey PAUSE > NUL @rem =======end Copy of modified imageres.dll to working directory============= @rem =======begin of set back ownership of imageres.dll to system directory============= cls echo Set Back Ownership of imageres.dll 1>>"%~dp0\temp\error.log" echo set back ownership of file @rem got to learn some day soon. echo not set - - - script needing finishing ECHO. echo press anykey PAUSE > NUL @rem =======end of set back ownership of imageres.dll to system directory============= @rem =======begin script start processes needed by imageres.dll============= cls ECHO STARTING PROCESSES depending on imageres.dll @REM need to make this an if statement if process was killed then restart it. 1>>"%~dp0\temp\error.log" echo starting processes killed >>"%~dp0\temp\error.log" 2>&1 start /b explorer.exe >null >>"%~dp0\temp\error.log" 2>&1 start /b rundll32.exe >null >>"%~dp0\temp\error.log" 2>&1 start /b procexp64.exe >null ECHO. echo press anykey PAUSE > NUL @rem =======end script start processes needed by imageres.dll============= @rem =======begin script UAC PARTUAL ENABLE needed by imageres.dll============= cls echo. echo set UAC to enable 1>>"%~dp0\temp\error.log" echo enable UAC >>"%~dp0\temp\error.log" 2>&1 %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f ECHO. echo press anykey PAUSE > NUL @rem =======end script UAC PARTUAL ENABLE needed by imageres.dll============= @rem =======begin script cleanup============= cls echo. echo cleanup time set path=%path%;%~dp0 >>"%~dp0\temp\error.log" 2>&1 echo %cd% 1>>"%~dp0\temp\error.log" echo cleanup time >>"%~dp0\temp\error.log" 2>&1 move "imagers.dll" "%~dp0\temp" >>"%~dp0\temp\error.log" 2>&1 move "imagers1.dll" "%~dp0\temp" ECHO. echo press anykey PAUSE > NUL @rem =======end script cleanup============= cls ECHO. echo Processing Ended 1>>"%~dp0\temp\error.log" echo selection 2 change logon wallpaper ended year%date:~-4,4%,day%date:~-7,2%,month%date:~-10,2%,time%time:~-11,2%,%time:~-8,2%. 1>>"%~dp0\temp\error.log" echo ------------------------------------------------------------------ ECHO. echo press anykey PAUSE > NUL GOTO MENU :Selection3 cls @rem idea to go here; is user icon on start menu or login icon setting echo wait test CALL :sleep 1 echo 3 echo press anykey PAUSE > NUL GOTO MENU :Selection4 cls echo 4 echo press anykey PAUSE > NUL GOTO MENU :Selection5 cls echo 5 echo press anykey PAUSE > NUL GOTO MENU :Selection6 cls echo 6 echo press anykey PAUSE > NUL GOTO MENU :Selection7 cls echo 7 echo press anykey PAUSE > NUL GOTO MENU :Selection8 cls echo 8 echo press anykey PAUSE > NUL GOTO MENU :Selection9 cls echo 9 echo press anykey PAUSE > NUL GOTO MENU :Quit CLS ECHO ==============THANKYOU=============== ECHO ------------------------------------- ECHO ======PRESS ANY KEY TO CONTINUE====== 1>>"%~dp0\temp\error.log" echo ======================================================================= 1>>"%~dp0\temp\error.log" echo --------------------------end of batch script-------------------------- move "%~dp0\temp\error.log" "%~dp0\temp" >nul PAUSE>NUL EXITFOR THOSE JUST LEARNING THIS MAY BE HELPFUL TOO YOU O'k here I stumbled onto something in my learning's. Thought I would share with the world right here Yes in my head account's, and thoughts.. sorry I am a bad speller! Here I am looking and wondering why I keep getting errors I log and set my path and yet it's like I am not making the right commands or something! so I go back and am trying to pick up on anything that might make cents. why did I need to set path? I just over looked this and thought well if I set it then I am working in it. right? Wrong!!! i did a set path=%~dp0\ and foxidrive set me strait. set path=%path%;%~dp0 but i don't think i made myself very clear that i was running this in owner administrator and useing cmd in administrator mode. idk maybe i did... but here is what i put together >>"%~dp0\temp\error.log" 2>&1 set path=%path%;%~dp0 nothing is in the log about it ether then i do something like this, put remember i am not getting what i am expecting so i am going the extra mile. >>"%~dp0\temp\error.log" 2>&1 copy "%windir%\system32\imageres.dll" "%windir%\system32\imageres.dll_%date:~-4,4%%date:~-7,2%%date:~-10,2%%time:~-11,2%%time:~-8,2%.old" or >>"%~dp0\temp\error.log" 2>&1 copy "%windir%\system32\imageres.dll" "%~dp0\" do you see what i am doing. i am being very specific were i want my files. why are you doing that snowcatman? well thank you foxidrive? for teaching me about logging. i keeped wondering why i keeped getting errors. and so i keeped adding more logging. then i wanted too. i keep trying to be more exact and trying to get it right. so i keeped going back and looking at all the code in the batch file. looking at this site and low and behold i am searching google too. not thinking common cents. sorry the Oakey in me. lol So I finally did a search with these words: "batch file default directory". thinking i must be reschooled right? I was thinking what is my directory and so earlier i was doing this too. @rem----------idea know my path-------------------- >>"%~dp0\temp\error.log" 2>&1 echo path is %cd% @rem----------------------------------------------- and in the log i find this. and with this information it hit me harder then someone throwing a rock my way, hitting a tin roof. the light had finally lit. path is C:\Windows\system32 why was i seeing this all the time. i know i set my path right? and that web page i stumbled on: http://shortfastcode.blogspot.com/2012/07/running-bat-file-as-administrator.html now i know there is a link from this site that must say the same thing. but i was just doing my ussual search find and ask questions later thing. so when starting my script i need to: @SETLOCAL ENABLEEXTENSIONS @cd /d "%~dp0" so to learn the birds and the bee's of batch scripting bun intended. lol this is the first little chunk of my script. added the lines after i did a quick check from my dos mode script @rem logonwallpaper.bat @ECHO OFF @SETLOCAL ENABLEEXTENSIONS @cd /d "%~dp0" @rem----------idea know my path-------------------- >>"%~dp0\temp\error.log" 2>&1 echo path is %cd% @rem----------------------------------------------- set path=%path%;%~dp0 >>"%~dp0\temp\error.log" 2>&1 echo path is %cd% i can now show you the differences of my logging and what in pack of adding those few commands to the beginning of my script did BEFORE -------------------------begining of batch script------------------------- ========================================================================== started personal branding script year2014,day12,month03,time 9,01. ========================================================================== path is C:\Windows\system32 -------------------------------------------- Selection3 For DOS Safe mode - more reliable -------------------------------------------- path is C:\Windows\system32 dos mode uac temp disable The operation completed successfully. if you read thus far, you will notice alot of other changes too. hope you got something out of this. thank you. taking ownership of imagers file SUCCESS: The file (or folder): "C:\Windows\system32\imageres.dll" now OWNED by user "snowballs\a". processed file: C:\Windows\system32\imageres.dll Successfully processed 1 files; Failed processing 0 files make a backup of imageres file 1 file(s) copied. copy imagers to local folder 1 file(s) copied. begin convert of imageres.dll file path is C:\Windows\system32 path is C:\Windows\system32 C:\Windows\system32 The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. The system cannot find the file specified. copy back modified emageres.dll file The filename, directory name, or volume label syntax is incorrect. set back ownership of file enable UAC The operation completed successfully. C:\Windows\system32 C:\Windows\system32 cleanup time The system cannot find the file specified. The system cannot find the file specified. selection 2 change logon wallpaper ended year2014,day12,month03,time 9,02. ------------------------------------------------------------------ ======================================================================= --------------------------end of batch script-------------------------- AFTER -------------------------begining of batch script------------------------- ========================================================================== started personal branding script year2014,day12,month03,time 9,31. ========================================================================== path is G:\BATCH.START -------------------------------------------- Selection3 For DOS Safe mode - more reliable -------------------------------------------- path is G:\BATCH.START dos mode uac temp disable The operation completed successfully. taking ownership of imagers file SUCCESS: The file (or folder): "C:\Windows\system32\imageres.dll" now owned by user "snowballs\a". processed file: C:\Windows\system32\imageres.dll Successfully processed 1 files; Failed processing 0 files make a backup of imageres file 1 file(s) copied. copy imagers to local folder 1 file(s) copied. begin convert of imageres.dll file path is G:\BATCH.START path is G:\BATCH.START G:\BATCH.START 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. 1 file(s) copied. copy back modified emageres.dll file The filename, directory name, or volume label syntax is incorrect. set back ownership of file enable UAC The operation completed successfully. G:\BATCH.START G:\BATCH.START cleanup time The system cannot find the file specified. The system cannot find the file specified. selection 2 change logon wallpaper ended year2014,day12,month03,time 9,33. ------------------------------------------------------------------ ======================================================================= --------------------------end of batch script-------------------------- |
|
| 7025. |
Solve : Message: Access Denied? |
|
Answer» I recently tried to delete some files from one of my DOS programs and got an ACCESS Denied MESSAGE. I've been doing this for YEARS, and this is a first. Any suggestions? I really need to delete certain files.C:\WINNT\system32>attrib /? |
|
| 7026. |
Solve : "Access is Denied"? |
|
Answer» I'm an idiot... |
|
| 7027. |
Solve : Batch script to read a .DAT file & rename it? |
|
Answer» I need a batch script which can read a file *.D00000.DAT and find the specific line as below |
|
| 7028. |
Solve : How to create a 20 minute looping batch file prog.? |
|
Answer» Please give me an example on how to create a batch files using internal and external command such as if and for and other batch FILE command that will for 20 minutes.I saw this done once using a ramdisk. Not very elegant. There is no SLEEP mechanism in DOS batch. You can download DOS utilities that can help you out. Also check out REXX, a scripting language for DOS. REXX WOULD have been a better choice for a MS-DOS SCRIPT langauage, but it's an IBM product. |
|
| 7029. |
Solve : Hard Drive Restore; need help with huge file move batches? |
|
Answer» Hi -- I'm new here, and am PROBABLY too sleepy to ask for help in an intelligent FASHION, but would appreciate any assistance (or pointing me to a similar solved thread...) you can provide. |
|
| 7030. |
Solve : Batch File continuation after execution of program? |
|
Answer» I wrote a DOS batch file to ERASE and transfer files before |
|
| 7031. |
Solve : installing win98ins? |
|
Answer» Hi Good afternoon |
|
| 7032. |
Solve : Want to add an always offline available network folder to Start as a menu? |
|
Answer» HI all, I've been searching over the web for a while now, but still have no solution for what I want. This .bat is to be used for a Windows 7 machine with SP1. 1. A shared folder on a network drive needs to be mapped. Done. 2. The content of this folder should be visible via a menu under the Start menu, e.g. like the favorites menu. 3. The documents in this folder should be always available offline. Anybody who has an idea? Your help is appreciated!The only way that I know about to access files from a drive while not plugged into the drive is to copy them to the drive and then have a system set up to replace the old one with the newer one. Kind of like what dropbox.com does (without the online server part). The start menu is located at "%appdata%\Microsoft\Windows\Start Menu\Programs" So I WOULD make a shortcut there to a location where you plan on storing the files (I would do this at "C:\FileServer\", but anywhere would really work.) Then you need to write a SCRIPT to compare FILE properties and copy the newer one to the other place, and over ride the old one. I look forward to seeing what you COME up with.What Lemonilla said is right on. You need to clarify -what you need, - rather that what you want. A BAT file is not the usual way to register a program with Windows. The script should be written with a tool that is moire suitable for menus. Microsoft experts recommend Vb-script and its variations fro such a job. See this link: VBScript pin items Start Menu help Yes, that does not directly do what your want. But it shows what is involved in putting an application into the start menu. It can take a lot of script to do the job. Please come back with your comments. |
|
| 7033. |
Solve : %%a empty first in in for do loop? |
|
Answer» FOR /F %%A in (content.txt) do echo %%A |
|
| 7034. |
Solve : what causes windows to start up?? |
|
Answer» is it a batch file? |
|
| 7035. |
Solve : Multiplication in DOC? |
|
Answer» How do I write code to MULTIPLY 66 by 27 in DOS?DOS is an operating system not designed for PROGRAMMING. If you mean how do you do mathematics in a .bat file, it's not really possible using the available batch file commands.Dear Dusty, How do I write code to multiply 66 by 27 in DOS? Use a calculator. It would be much quicker. By the way the answer is 1782. |
|
| 7036. |
Solve : Moving Multiple files (pics) From One Folder TO multiple Folders? |
|
Answer» I have created multiple folders using batch file i.e. md 1,md 2,...,md n successfully. Now i want to move multiple files from different source on same COMPUTER to these FOLDER, Files and folders have same name i.e. I want to move 1_p.jpg and 1_s.jpg to folder named 1 dynamically, is this possible? If yes then how i have more than 5000 folders and 1500 files to be moved so its time taking and irritating, any help will be appreciated, Thank you in advanced (PROGRAMMING solution in any language can be helpful)QUOTE from: swapnilk716 on March 04, 2014, 12:09:07 AM I want to move 1_p.jpg and 1_s.jpg to folder named 1 dynamically, is this possible? It is possible, and folders could have been created too - but the actual format of the filenames is important as batch is sensitive to the makeup of the text it is parsing. You have to confirm that the folders are named 1,2,3,4,5, etc and that the filenames are number_name.jpg |
|
| 7037. |
Solve : dynamik file name in batch file? |
|
Answer» I want to create a batch file which will create a dumpfile every DAY. So I want to set the name of the dump file as production_. Now how to include date in the file name |
|
| 7038. |
Solve : Get input fron other application? |
|
Answer» Problem |
|
| 7039. |
Solve : how can i rename my current folder?? |
|
Answer» thanks dear foxidrive best answers(www.my-website.com)all membersQuote from: mioo_sara on March 01, 2014, 11:04:04 PM best answers(www.my-website.com)all members This makes the job more difficult as there is no well defined FORMAT for the password.Quote This makes the job more difficult as there is no well defined format for the password.i know at this particular time i don't need passwords i just want to remove them from folder's name i tried script below it's working and removed www.*.com from folder's name but i should type www.*.com for every folder i want program DETECT it automatically Quote for /f "tokens=* delims= " %%i in ('dir /b "*.*"') do Set LIST=%%i& set LIST | ren "%%~fi" "%%LIST:www.my-website.com= %%" by the way i tested it on a file and not a folder but this one works on folders very good but i want www.?.com or www.?.net detect automatically and replaced with space EQuote ECHO OFFThe task does not have a well defined format so a general script is impossible and so it has to have an exception for every type of format that is used. This batch file works for the two formats you have shown, and will handle www.*.com and www.*.net, and it uses the repl.bat tool by Dave Benham. It creates the password.txt file inside the folder with the website address - and the batch file has to be launched from the path and not located inside the folder, because doing that would lock the folder itself and the rename would fail. If you can deal with this folder "best answers(www.my-website.com)all members" becoming this "best answers()all members" and this folder "my_broadcasting_www.mediafree.net" becoming this "my_broadcasting_" so that only the website address is removed then it could be simplified and would handle other folder-name formats. V2.0 Code: [Select]@echo off for %%a in ("%cd%") do set "folder=%%~nxa" cd.. del renfolder.bat 2>nul :: handles (www.aaa.com) echo "%folder%"|repl ".(.*)\((www\..*?\.com)\)(.*)." ">$&\password.txt echo $2& ren $& \q$1 $3\q" axi >>renfolder.bat :: handles (www.aaa.net) echo "%folder%"|repl ".(.*)\((www\..*?\.net)\)(.*)." ">$&\password.txt echo $2&ren $& \q$1 $3\q" axi >>renfolder.bat :: handles _www.aaa.com echo "%folder%"|repl ".(.*)_(www\..*?\.com)(.*)." ">$&\password.txt echo $2&ren $& \q$1 $3\q" axi >>renfolder.bat :: handles _www.aaa.net echo "%folder%"|repl ".(.*)_(www\..*?\.net)(.*)." ">$&\password.txt echo $2&ren $& \q$1 $3\q" axi >>renfolder.bat call renfolder.bat del renfolder.bat 2>nul pause This uses a helper batch file called `repl.bat` - download from: https://www.dropbox.com/s/qidqwztmetbvklt/repl.bat Place `repl.bat` in the same folder as the batch file or in a folder that is on the path.well dear foxidrive i tested your script but i wonder if it was my problem or the script but it didn't worked! here's what i did for testing the script 1-i made a new folder named it test folder 2- inside it i made another 2 folders with website name in their names examle my-testing1_www.myweb.com_in test my-testing2_www.mysite.net 3- now i copied both (repl.bat and test-batch.bat) in test folder (next to those folders) now i tried the script test-batch.bat but nothing happened what do you think? Quote from: mioo_sara on March 02, 2014, 01:16:24 PM 3- now i copied both (repl.bat and test-batch.bat) in test folder (next to those folders) Perhaps I wasn't clear enough but I said this: Quote - and the batch file has to be launched from the path and not located inside the folder, because doing that would lock the folder itself and the rename would fail. You must put the batch file and repl.bat in a folder on the path, such as c:\windows or c:\windows\system32 When you are at a cmd prompt inside the folder, then you type the batch-command dear foxidrive i tested your v2 script and i don't know why it's still not responding correctly here's result of my test ===================================================== 1-first of all i have windows xp sp3 installed on my pc and my win-xp is in drive f: (i don't think if it would be the reason of that) 2- in first try i copied both files(repl.bat and test-batch.bat) to f:\windows then i clicked on f:\mytest\go.bat (inside of go.bat there is this comment f:\windows\test-batch.bat ) nothing but a black screen that has vanished! inside folder ( f:\mytest\ ) there are some folders that their names have website's name i checked them but nothing has been changed! no rename and no password.txt 3- so in another test i copied both (repl.bat and test-batch.bat) to f:\windows\system32 but still nothing happened 4- in another test i tried CMD i opened CMD and typed f:\mytest\go.bat still no successful result ============================= now i have some questions should i really do this process with copying some files in windows? i mean to me it doesn't seem to be that difficult for a task like this i think program can do some Dir find folders that their names has letters begin with (www.) and end with .com or .net and remove these letters from begin to end right? and create a password.text in folder containing (www.....com) You said that you wanted to do this from inside the folder. You can't click on a batch file inside the folder though because it will lock the folder and it cannot be renamed. Just to prove it works, place the two batch files repl.bat and test-batch.bat into c:\windows and then open a cmd prompt inside the folder to be renamed. Then type test-batch and you should see the folder renamed and a password.txt appear inside the folder. wow ! dear foxidrive it actually worked !! i can't even believe it ! you know if you read my first post in this topic i was looking for a way to rename my current folder but cuz it was being used by the explorer and even batch itself some guys in the forum said it's not possible . and i was disappointed so i changed my idea and tried another way(i decided to rename another folders and not current folder) but now you proved that it's possible thank you very very very much you solved one of my biggest problems cuz there where hundreds of folders that i wanted to be renamed but cuz my program was added to my right click menu i wanted just selected folder renamed and not all of them(that's my current folder story) and sorry for the late answer i was out of town for a few hours thanks again i hope you have very good year ahead for yourself and for your family sorry to disturb you again dear foxidrive i don't know why program is not stable i mean i tried it with LOTS of other folders and although their structures where not different in names but program didn't worked anymore and i even tried to make a folder with my first test structure (first successful test) but it failed again and nothing happened i even disabled my kaspersky antivirus but nothing changed don't you think if it would be better to do it with DIR and if program found folder with website names ask if i want it to be renamed (yes/no) i think copying .bat file in windows make it more unstable than before i can remove program from my right click menu (forget about current folder)and work with search and replace (yes/no) what do you think? now i'v found reason of the problem problem was because of folder's name and( ) those that their names was in () just has been renamed ok ! ok i can solve this problem dear foxidrive thanks again |
|
| 7040. |
Solve : Search and Rename a File? |
|
Answer» I NEED to find the full path of bookmark.nsf on the c: drive then rename that FILE to bookmark.old.From the root directory on C: enter: |
|
| 7041. |
Solve : read DOS files with Windows 98? |
|
Answer» I WOULD like to read DOS FILES with the following EXTENSIONS "B01" and "S01" and "SCP" with windows. Can anyone help |
|
| 7042. |
Solve : Need command to find a file in subfolders and then move the result.? |
|
Answer» Hello New here - I ... need ... to search for file by extension and after finding it in about 3+ folders deep need to move it to a different folder. about 3+ folders deep doesn't give us a good idea of the actual task. If Lemonilla's code isn't what you need then describe the exact task, giving examples of the extensions needed and the folder structure.I am getting a %%A was unexpected at this time. error message when executing: for /f "delims=" %%A in ('dir test.txt /b /s') do echo copy "%%A" "%c:\new_Location%" Answer to foxidrive: about 3+ folders deep = the file I may be looking for may reside in 3 or more folders deep on my path. path = c:\test\temp\variable\ At this time the example has a test.txt file located on (variable) - folder. (3 folders deep on the path) The name of the "variable" folder may vary each time I run this command. Screen shot below: [recovering disk space, attachment deleted by admin]You only double the % SIGN if you are working within a batch file (because % is the escape character for % /mind=blown). And it doesn't appear you set %C:\new_location% to any value. (Hint: ANYTHING surrounded in % signs is a variable.Try this from the CMD prompt. Does it show the file you are looking for? Code: [Select] for /r "c:\test\temp" %a in (test.txt) do echo copy "%a" "c:\new\location"Foxidrive - That worked perfectly.... Thanks a bunch for all who have helped me with the project. |
|
| 7043. |
Solve : reading a txt file to generate cli params? |
|
Answer» hi .. |
|
| 7044. |
Solve : i have a real easy question for you guys? |
|
Answer» hey, i found the FILE i NEED to open but how the *censored* do i open it in DOS mode? do i type open (file name)?? or RUN or what? I just need to know how to simply open a file once i've found it in DOS Mode....pplleeaasssee help?'open' isnt a valid command neither is run. |
|
| 7045. |
Solve : A good tutorial site for batch programming?? |
|
Answer» Patio, I used the spell checker I this is what happened. Powers *censored* is already in Windows 7That sould have caused you to remember it's all one word.... I spelled it *censored* one word. The spell checker splatted it.Don't tell me that CH censors the word '*censored*'? Is this 2014 or 1714? Quote from: Geek-9pm on February 26, 2014, 01:53:44 PM I spelled it *censored* one word. The spell checker splatted it. It just goes on... Let me try something. Code: [Select]Microsoft Powershell <= two words Microsoft Powers *censored* <= three words How is that? That means that if I want t o share a bit of code with anybody here, it has to pass the censor test. Is there a list of Anglo-saxon words that can not be used? You can turn censorship on or off in your forum profile. I have mine turned OFF. It's in 'Look and Layout'. You have to check the box for 'Leave words uncensored'. It is SMF's default censor list, I think. It can be shut off via your profile. It's probably a good idea. I have heard too many stories of young children becoming serial rapists and MURDERERS because they read swear words online. It's a gateway. One DAY you're an innocent five year old, next you start hearing curse words and repeating them and by the time you are 8 you're a DRUG dealer, and by the time you're 11 you've already got a triple-digit body count and have left a trail of destroyed families left wondering why. /s Quote from: BC_Programmer on February 26, 2014, 02:06:47 PM I have heard too many stories of young children becoming serial rapists and murderers because they read swear words online. When my father was doing carpentry, if he hit his thumb with the hammer, he would shout '*censored*!' at the top of his voice. This was before the internet or even colour TV. Quote from: Geek-9pm on February 26, 2014, 10:50:15 AM In has to be installed in Windows XP XP has around 40 days left before any exploits will not be patched. It was a good OS but is 12 years old now and there are improvements in Win 7 and 8 which are beneficial, and they are both stable and good OS's, like XP was. Quote from: Geek-9pm on February 26, 2014, 01:53:44 PM I spelled it *censored* one word. The spell checker splatted it. Based on this...and previous posts over the last year or so i'm convinced you do this as a form of self-amusement...We are GOING a bit off topic here... Prof Timo Salmi has a collection of batch scripts and tips that you can read on his site, or download the ZIP files to look at, if you want to learn that way. Search alt.msdos.batch.nt on google groups for his regular FAQ postings. If you want to read and follow forums, then there are several. Getting premade scripts and modifying them, then debugging the failures is a good way to pick up tips and techniques. Asking questions on the forums will get you ANSWERS, if you supply factual details. AFAIK there are no good tutorials for modern NT scripting and that's because so much of batch scripting is undocumented techniques, tips, and limitations, discovered by so many people. Quote from: foxidrive on February 27, 2014, 02:21:54 AM ....Exactly! |
|
| 7046. |
Solve : 1) How do we make a folder in windows Pswd protect? |
|
Answer» Hi there Hi there DOS is not the solution for your problem |
|
| 7047. |
Solve : DOSKEY never works? |
|
Answer» My "DOSKEY" command doens't SEEM to work. After contacting a tech service line, they SIMPLY had me replace the DOSKEY.exe file with theirs, then all was fine when I wanted to use the up/down arrows etc.. |
|
| 7048. |
Solve : Converting JCL to DOS bat? |
|
Answer» I am converting mainframe JCL to DOS batch files and need method of creating/using GDG file sets. Any help with this and other JCL conversion would be appreciated.There is no counterpart for a GDG on a PC. On a mainframe, a GDG DSN is in the format of basedsn.G000000V00; You can name a file on the PC with that format, but you cannot refer to it with relative generation numbers. |
|
| 7049. |
Solve : MS Dos seems to encounter some problem,Please help? |
|
Answer» hi, |
|
| 7050. |
Solve : DOS: copying commands? |
|
Answer» Hi there, copy c:\...\*.* d:\...\ I was just looking in the folders and writing down paths for creating directories on drive D, and have finally started with MKDIR command but all I was getting was "Access is denied". What should I do? |
|