Search found 319 matches

by ghostmachine4
22 Jul 2009 02:26
Forum: DOS Batch Forum
Topic: Nid Help in DOS 5 commands
Replies: 1
Views: 3759

windows 98 comes with the windows scripting host version 1.0. you can make use of that to write vbscript.
by ghostmachine4
20 Jul 2009 18:55
Forum: DOS Batch Forum
Topic: batch file inorder to delete cookies/ temporal internet file
Replies: 1
Views: 3945

type "batch delete temporary internet files" in google.
by ghostmachine4
20 Jul 2009 18:53
Forum: DOS Batch Forum
Topic: Set command help
Replies: 5
Views: 6695

where does your %test% variable come from? why is there a need to change %1 in your script? you can just pass the correct variable to the batch file when invoking it. I can't really understand what you are trying to do.
by ghostmachine4
20 Jul 2009 17:47
Forum: DOS Batch Forum
Topic: FTP - Put new files only
Replies: 3
Views: 6828

you can download [url "http://gnuwin32.sourceforge.net/packages/findutils.htm"]findutils from GNU[/url], then use the find command. first you create a dummy file, say we call it dummy.txt. then issue this command for .... ( find_gnu.exe /localpath -type f -name "*.pdf" -newer...
by ghostmachine4
20 Jul 2009 17:40
Forum: DOS Batch Forum
Topic: Set command help
Replies: 5
Views: 6695

what is the actual problem you are trying to solve?
by ghostmachine4
17 Jul 2009 22:57
Forum: DOS Batch Forum
Topic: Copy files
Replies: 9
Views: 10363

that's just about it. thumbs up for that verification.
dir can also include /a-d to skip checking directories, but that's just trivial.
by ghostmachine4
17 Jul 2009 22:22
Forum: DOS Batch Forum
Topic: Copy files
Replies: 9
Views: 10363

I'm not convinced that traversing once is a benefit because then you have to do multiple (on average) compare operation to determine the extension and then copy the file. string comparison can be done using cmd.exe's internals. eg if/else, set , for loop etc. . Also dir is built into cmd.exe so usi...
by ghostmachine4
17 Jul 2009 11:33
Forum: DOS Batch Forum
Topic: Copy files
Replies: 9
Views: 10363

I can't think of anything in DOS that wouldn't be significantly more complicated. Perhaps a dir /b /s piped through multiple findstr /v commands. Actually, I can't think of any way in DOS to traverse the drive once and get all the different extensions without using a temp file--which may be less ef...
by ghostmachine4
16 Jul 2009 23:20
Forum: DOS Batch Forum
Topic: Copy files
Replies: 9
Views: 10363

UNTESTED off the top of my head: for %%a in (c d e f g) do ( for %%b in (jpg txt 3pg mp4) do ( for /f "tokens=* delims=" %%c in ('dir /b /s %%a:*.%%b) do copy "%%c" i:\%%b ) ) why not traverse the drive once , and check for extension. more...
by ghostmachine4
16 Jul 2009 23:16
Forum: DOS Batch Forum
Topic: Copy files
Replies: 9
Views: 10363

here's a vbscript Set objFS = CreateObject("Scripting.FileSystemObject") Dim drive(5) drive(0) = "c:\" drive(1) = "d:\" drive(2) = "e:\" drive(3) = "f:\" drive(4) = "g:\" For i=LBound&...
by ghostmachine4
15 Jul 2009 20:04
Forum: DOS Batch Forum
Topic: checking consecutive dates
Replies: 2
Views: 4595

here's a vbscript Set objFS = CreateObject("Scripting.FileSystemObject") strFolder = "c:\test" Dim ArrFolders() i=0 Set objFolder = objFS.GetFolder(strFolder) Go (objFolder) Sub Go(objDIR) If objDIR <> "\System Volume Information"...
by ghostmachine4
12 Jul 2009 05:16
Forum: DOS Batch Forum
Topic: read simultialy from two files
Replies: 3
Views: 5381

assuming your files are of the same number of lines, here's a vbscript Set objFS = CreateObject("Scripting.FileSystemObject") strFile1 = "c:\test\file.txt" strFile2 = "c:\test\file2.txt" Set objFile1 = objFS.OpenTextFile(strFile1) Set objFile2 = objFS.Op...
by ghostmachine4
11 Jul 2009 20:31
Forum: DOS Batch Forum
Topic: Cross referencing folders
Replies: 4
Views: 6235

@OP, does your files in FolderA and FolderB have the same directory structure? anyway, here's a vbscript. It doesn't assume you have same directory structure. ie, if a file anywhere under the directory FolderA exists already in FolderB (also anywhere) , then it will delete the file Set objFS = Creat...
by ghostmachine4
08 Jul 2009 21:05
Forum: DOS Batch Forum
Topic: findstr question
Replies: 3
Views: 5642

if you can download and usegawk for windows, here's a one liner

Code: Select all

C:\test>gawk "/sorry.google/{f[FILENAME]++}END{for(i in f) print f[i],i}" logs*txt
by ghostmachine4
08 Jul 2009 20:28
Forum: DOS Batch Forum
Topic: Filename to DateTime
Replies: 9
Views: 10982

Are you serious? It's a perfectly reasonable assumption from the original post that this will be run on 1 machine and, as a "former DOS pro" it is further reasonable to assume that the original poster can tweak the code to match his regional requirements. well, if its an assumption, then ...