Search found 360 matches

by Samir
20 Jul 2013 17:15
Forum: DOS Batch Forum
Topic: Possible to convert M$ Word Doc into .TXT?
Replies: 15
Views: 6200

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: 2252

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: 5722

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: 10074

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: 5272

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: 5272

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...
by Samir
20 Jul 2013 16:41
Forum: DOS Batch Forum
Topic: How to carry out an action in all folders in a dir.
Replies: 6
Views: 1990

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

For has an option to carry out a command recursively through all directories. I'd look into that.

The /s switch on xcopy won't help in this use case.
by Samir
20 Jul 2013 11:33
Forum: DOS Batch Forum
Topic: For Loop
Replies: 8
Views: 2876

Re: For Loop

MLGsuperGame414 wrote:Okay so I could have 4 possible dirs to choose from? Or x amount?
In this particular example the command 'dir x' is run x times. If I would have put in 1-20 there it would have been dir 1-20.
by Samir
19 Jul 2013 15:58
Forum: DOS Batch Forum
Topic: Possible to convert M$ Word Doc into .TXT?
Replies: 15
Views: 6200

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

foxidrive wrote:That's an interesting use of doskey. :)
I saw that and am totally confused. :?:
by Samir
19 Jul 2013 15:56
Forum: DOS Batch Forum
Topic: Finding newest file in all subdirectories
Replies: 33
Views: 25783

Re: Finding newest file in all subdirectories

I think my approach to this would be to use dir's ability to sort files and then pull off the top/bottom one as that would be the most recent. And then nest this in a for loop to hit all the directories and pipe the result to another file.
by Samir
19 Jul 2013 15:52
Forum: DOS Batch Forum
Topic: batch file to search and copy particular file
Replies: 13
Views: 5272

Re: batch file to search and copy particular file

There's a switch in xcopy that allows you to specify files or using wildcards, extensions to exclude. You can also use it to exclude paths.

My approach would be to detect all the drives I need to search, and run an xcopy with my exlusions file on each drive. Hide the directory and be done.
by Samir
19 Jul 2013 15:46
Forum: DOS Batch Forum
Topic: Merge two folders - please help
Replies: 8
Views: 1746

Re: Merge two folders - please help

foxidrive wrote:
dosmushi wrote:How to achieve this?


What do you want to do? Please describe your aim.
Yeah, I was a bit confused too. It seemed like an easy xcopy solution, but the conbined foldername requirements aren't clear.
by Samir
17 Jul 2013 11:08
Forum: DOS Batch Forum
Topic: saving and loading to a separate file using batch
Replies: 6
Views: 2322

Re: saving and loading to a separate file using batch

vvomble wrote:Thanks for all your help hopefully this will help me get started with what I'm aiming for. Which is a street racing text adventure where you can buy and tune up a car and race.
I can sooooo help you test this as I run a car enthusiast web site, among other things. 8)
by Samir
17 Jul 2013 10:57
Forum: DOS Batch Forum
Topic: A different method to trim spaces from a string
Replies: 16
Views: 8486

Re: A different method to trim spaces from a string

Using %~nf without %~nxf will make periods a poison character and seriously limit the usefulness of the exploit. As I illustrated in my code above, %~nxa works well. @Samir Additionally %~nf will shorten " test & ^^ & . def " to " test & ^^ &", and %~xf will shor...
by Samir
17 Jul 2013 10:43
Forum: DOS Batch Forum
Topic: Merge two folders - please help
Replies: 8
Views: 1746

Re: Merge two folders - please help

Looks like a couple of different requirements. If your folder FolderX's are named the same, a simple xcopy command will do it unless there are identical file names. For identical names, you'll have to rename something unless you want the files actually merged. I'm not sure I follow the others requir...