Search found 4036 matches

by Squashman
20 Jan 2012 13:38
Forum: DOS Batch Forum
Topic: Piped input and output to a batch file
Replies: 18
Views: 10544

Re: Piped input and output to a batch file

Well it eventually did output a file. It took a couple of minutes which I thought was kind of long for such a small file. The Input file was only 6MB but it only output a file 2,962,200 bytes. It stopped midstream in the middle of line. The very end of the output was this ^C FILENAME
by Squashman
20 Jan 2012 13:24
Forum: DOS Batch Forum
Topic: grab specific text from a location in a file.
Replies: 5
Views: 2861

Re: grab specific text from a location in a file.

If you are parsing a text file with a for Loop you can set the loop variable to another variable and then parse the string by position. Is this unknown text on a specific line in the file? Or is the file just one line long?
http://www.dostips.com/DtTipsStringMani ... .MidString
by Squashman
20 Jan 2012 13:19
Forum: DOS Batch Forum
Topic: Piped input and output to a batch file
Replies: 18
Views: 10544

Re: Piped input and output to a batch file

Aacini, I gave this a try. Just trying to append the actual file name with some spaces padded to the end of every record. Didn't seem to do anything. It just hung with an error message: Cannot load VDM IPX/SPX support Using XP Pro 32bit @echo off if not exist pipe.com call :CreatePipe setlocal Enabl...
by Squashman
19 Jan 2012 07:49
Forum: DOS Batch Forum
Topic: Can a batch script run from a network share location?
Replies: 5
Views: 3367

Re: Can a batch script run from a network share location?

djangofan wrote:I don't think so. If I go into a any more complex example, such as using COPY.exe, then it fails to copy with a similar error. Therefore, I am wondering what the secret is, as I currently do not believe it is possible.

xcopy supports UNC paths.
by Squashman
19 Jan 2012 07:46
Forum: DOS Batch Forum
Topic: Can a batch script run from a network share location?
Replies: 5
Views: 3367

Re: Can a batch script run from a network share location?

Food for thought

Code: Select all

@echo off
SET MyDIR=%~dp0
echo %MyDIR%
pushd %MyDIR%
echo %CD%
pause
by Squashman
18 Jan 2012 16:48
Forum: DOS Batch Forum
Topic: Count empty drive letters
Replies: 7
Views: 3161

Re: Count empty drive letters

That's fine. May be you can suggest another issue: When a user is prompted for input with Set /p to enter file name, how to type a suggested file name on screen that the user can directly edit by typing? I don't think it can be done in pure batch but I could be wrong. But here is a third party solu...
by Squashman
17 Jan 2012 15:40
Forum: DOS Batch Forum
Topic: Reading a txt file and create others
Replies: 3
Views: 1695

Re: Reading a txt file and create others

You need to use delayed expansion
by Squashman
17 Jan 2012 06:43
Forum: DOS Batch Forum
Topic: Running a batch file on android phone using java eclipse
Replies: 6
Views: 13213

Re: Running a batch file on android phone using java eclipse

I see. Thank you. How do I get the DOS emulator? Search the Android Market Is there any way that can covert bat file to apk and load it to the phone?? Thanks:) The DOS emulator is the APK. You would need to put the bat file on your phone and run it in the emulator and then hope it can run it but I ...
by Squashman
16 Jan 2012 08:42
Forum: DOS Batch Forum
Topic: Running a batch file on android phone using java eclipse
Replies: 6
Views: 13213

Re: Running a batch file on android phone using java eclipse

Well they do make a couple of different DOS emulators for Android but they are extremely slow and are limited to what commands they have available. I have tried a few of them and they are slow and clunky.
by Squashman
16 Jan 2012 07:25
Forum: DOS Batch Forum
Topic: Help needed for creating Folder structure
Replies: 8
Views: 3944

Re: Help needed for creating Folder structure

Are you saying you have this folder structure E:\>tree colors Folder PATH listing for volume Big Drive Volume serial number is D23A-41A4 E:\COLORS ├───blue ├───green ├───oragne └───red And you want a script to make a series of sub folders named 1\a 1\b and 1\c inside each of them to look like this? ...
by Squashman
16 Jan 2012 07:13
Forum: DOS Batch Forum
Topic: Batch command execution times
Replies: 2
Views: 2025

Re: Batch command execution times

Most of that is dependent on your input data and also if you are running the script from a Network resource. If your input file is thousands of lines long it could take a while to find your search argument in your file and I can guarantee it will probably take 3 times longer on a Network Resource. I...
by Squashman
16 Jan 2012 07:08
Forum: DOS Batch Forum
Topic: remove carriage return in dos command
Replies: 7
Views: 14412

Re: remove carriage return in dos command

seems the code doesnt work it gives error C:\Users\Ld78977>for /F "delims=" %%a in ('ver') do set version=%%a %%a was unexpected at this time. C:\Users\Ld78977>echo %username% OS is %version% ld78977 OS is %version% As Jeb pointed out to you already I thought I would show you the relevant...
by Squashman
15 Jan 2012 08:42
Forum: DOS Batch Forum
Topic: CMD timeout (one-line command to do multiple tasks)?
Replies: 9
Views: 5571

Re: CMD timeout (one-line command to do multiple tasks)?

That is a pipe. You are directing the output of one command and telling the next command to use it as input.