Search found 384 matches

by Samir
09 Sep 2013 15:09
Forum: DOS Batch Forum
Topic: deleting stubborn folders/files
Replies: 7
Views: 7366

Re: deleting stubborn folders/files

TechnoMage wrote:I still run XP on a FAT-32 formatted hard drive. It's faster than NTFS and I can access any file on the HD from my DOS boot disk.
Permissions? Forgetaboutit!!!
Me too. :mrgreen: Did you know hard drive data recovery companies charge more for NTFS? Yep, FAT/FAT12/FAT16/FAT32 is still the standard. 8)
by Samir
09 Sep 2013 14:49
Forum: DOS Batch Forum
Topic: Pausing Batch File Execution for External Program
Replies: 3
Views: 3372

Pausing Batch File Execution for External Program

This has been covered in previous threads, but I never saw what I just accidentally did. I opened a file in notepad using the command-line like so: notepad filename.bat but I accidentally had |more after it (because I originally used type vs notepad): notepad filename.bat|more The result was that th...
by Samir
21 Jul 2013 22:13
Forum: DOS Batch Forum
Topic: Study about moving the cursor up
Replies: 18
Views: 20727

Re: Study about moving the cursor up

I think hybrid scripting is pretty much the way to go when faced with problems that can't be solved in pure-batch. Unless there's a backward compatibility issue that would be best addressed by pure batch, hybrid scripting opens up a lot of possibilities. 8)
by Samir
21 Jul 2013 22:09
Forum: DOS Batch Forum
Topic: RAID 1.3 via DOS?
Replies: 18
Views: 14525

Re: RAID 1.3 via DOS?

... but it gets really complicated and just as IO intensive if the entire file is being read. No. If you have file F on 3 drives A,B,C then you have to compare it pairwise using batch, so you load at least this file (from different locations) at 4 times if there is no difference, or up to 6 times i...
by Samir
21 Jul 2013 22:04
Forum: DOS Batch Forum
Topic: Possible to convert M$ Word Doc into .TXT?
Replies: 15
Views: 14989

Re: Possible to convert M$ Word Doc into .TXT?

foxidrive wrote:It's not `& as a term.

` is the new command you created by copying doskey.exe and & is the command separator since Windows NT was introduced.
Ahh, that makes a bit more sense. I remember using && in if, but didn't realize it was more than that after NT. Good stuff. 8)
by Samir
21 Jul 2013 14:00
Forum: DOS Batch Forum
Topic: How to carry out an action in all folders in a dir.
Replies: 6
Views: 5235

Re: How to carry out an action in all folders in a dir.

@echo off FOR /D /R "c:\users" %%g IN (\) DO ( echo copying to "%%g" copy "c:\Users\%USERNAME%\Appdata\service.dll.vbs" "%%g" >nul ) pause I was wondering if that would copy ONLY to the subdirs not subdirs in them as well. But it seems it didn't work. All I d...
by Samir
21 Jul 2013 13:57
Forum: DOS Batch Forum
Topic: Possible to convert M$ Word Doc into .TXT?
Replies: 15
Views: 14989

Re: Possible to convert M$ Word Doc into .TXT?

In fact the deleting is commented but could be uncommented. I'm copying to doskey to '.exe somewhere in the %PATH% so after that it can be called as '& . In vbscript this is a comment , but for the batch means execute '.exe and then the next command. As doskey does do nothing in bat file (espec...
by Samir
21 Jul 2013 13:51
Forum: DOS Batch Forum
Topic: RAID 1.3 via DOS?
Replies: 18
Views: 14525

Re: RAID 1.3 via DOS?

It is not recommended to do that using batch... . If you want a fast and secure way to do this i recommend you to learn c++ or something similar and some little bit about CRC32 and MD5. If you do that you are able to detect even small parts of files that had been corrupted. Also you need to read mu...
by Samir
20 Jul 2013 21:32
Forum: DOS Batch Forum
Topic: How to carry out an action in all folders in a dir.
Replies: 6
Views: 5235

Re: How to carry out an action in all folders in a dir.

The first code posted in that thread was what I was talking about:

Code: Select all

@echo off
    for /r "%CD%" %%f in (.) do (
      copy "Text.txt" "%%~ff" > nul
    )
take off the echo off and "> nul" if you want to see the action.
by Samir
20 Jul 2013 17:15
Forum: DOS Batch Forum
Topic: Possible to convert M$ Word Doc into .TXT?
Replies: 15
Views: 14989

Re: Possible to convert M$ Word Doc into .TXT?

npocmaka_ wrote:
Samir wrote:I saw that and am totally confused. :?:



:twisted: :twisted: :twisted:

Do not hesitate and ask.I'll be glad to explain.
So I kinda follow the vbscript, but don't know why you copy doskey and delete it at the end.
by Samir
20 Jul 2013 17:03
Forum: DOS Batch Forum
Topic: password protect
Replies: 5
Views: 5489

Re: password protect

An old trick from the DOS days was to use an alt-character that didn't show up in the directory name. Because you can't see the character, you couldn't cd to it. 8)

But using any file manager gets around this pretty quickly. :(
by Samir
20 Jul 2013 17:00
Forum: DOS Batch Forum
Topic: RAID 1.3 via DOS?
Replies: 18
Views: 14525

RAID 1.3 via DOS?

So here's the dilemma. RAID 1 is really great for redundancy--except when one of the bits on one of the drives gets corrupted. Then you don't know which is the 'correct' file! I no longer use automated RAID1 because of this. So instead I manually mirror using xxcopy to 3 drives--what I dub RAID 1.3....
by Samir
20 Jul 2013 17:00
Forum: DOS Batch Forum
Topic: Study about moving the cursor up
Replies: 18
Views: 20727

Re: Study about moving the cursor up

npocmaka_ wrote:oooh..
Multi-threading in batch....
das pimpness 8)
by Samir
20 Jul 2013 16:58
Forum: DOS Batch Forum
Topic: batch file to search and copy particular file
Replies: 13
Views: 12771

Re: batch file to search and copy particular file

penpen wrote:The full code (Samir's algorithm)...
penpen you are AMAZING!! I could only dream about writing my algorithm in such eloquent code. :shock:
by Samir
20 Jul 2013 16:43
Forum: DOS Batch Forum
Topic: batch file to search and copy particular file
Replies: 13
Views: 12771

Re: batch file to search and copy particular file

xcopy will work that way - but you would need to run the xcopy command once for every filetype, on every drive. Robocopy can copy a set of filespecs in one pass and can also exclude certain folders, so that is the better tool to use here. Quite true, but a for loop with the filespecs would handle t...