Search found 8 matches

by sfgman63
27 Jan 2010 02:50
Forum: DOS Batch Forum
Topic: need help passing a variable
Replies: 11
Views: 16338

Re: need help passing a variable

Hello aGerman,
Thank you very much I had a feeling it was going to be something simple that I overlooked.
by sfgman63
27 Jan 2010 00:20
Forum: DOS Batch Forum
Topic: need help passing a variable
Replies: 11
Views: 16338

need help passing a variable

I'm trying to use the toHex dostips function but Im having troubles passing the variable. Here is the code: @echo off :start set /p dec=Enter Decimal Number to Convert : call :toHex %dec% echo converted decimal # = %hex% goto start goto :EOF :toHex dec hex ::$created 20091203 :$changed 20091203 :$ca...
by sfgman63
12 Dec 2009 02:30
Forum: DOS Batch Forum
Topic: Help with FOR /D with space in pathname
Replies: 3
Views: 6267

Thanks sxekjb and DosItHelp, both of your suggestions worked.
by sfgman63
11 Dec 2009 16:43
Forum: DOS Batch Forum
Topic: Help with FOR /D with space in pathname
Replies: 3
Views: 6267

Help with FOR /D with space in pathname

My FOR loop works when there are no spaces in the path name FOR /D %%i IN (C:\FCTLogs\FirstRun\TestLogs\ABC*) DO RMDIR /S /Q %%i But when there is a space it doesn't work (tried enclosing in quotes and still didn't work): FOR /D %%i IN (C:\Documents and Settings\TestLogs\ABC*) DO RMD...
by sfgman63
05 Dec 2009 15:22
Forum: DOS Batch Forum
Topic: Help with parsing log file
Replies: 2
Views: 4738

jeb, thanks for the quick reply. I put together some quick test code to try it out: @echo off set serial=%1 cd /d c:\temp for /d %%a in (temp2*) do ( IF EXIST "C:\temp\%%a\%1_test.txt" echo "RUN LOG EXIST" && call :TestFile C:\temp\%%a\%1_test.txt && g...
by sfgman63
04 Dec 2009 20:33
Forum: DOS Batch Forum
Topic: Help with parsing log file
Replies: 2
Views: 4738

Help with parsing log file

Here is my current code with the help from avery_larry (thank you very much!!!). @echo off set serial=%1 IF EXIST i:\path.info ( goto SEARCHLOGS ) ELSE ( net use i: \\10.10.20.30\TestLogs ) :SEARCHLOGS cd /d i:\Current_Production\ for /d %%a in (temp2*) do ( if exist &quo...
by sfgman63
26 Nov 2009 12:43
Forum: DOS Batch Forum
Topic: IF EXIST with wildcards
Replies: 2
Views: 13453

Thanks Larry... I was wondering, the file I'm searching for is on a network drive so instead of using cd to change to the directory can I do something like this: @echo off for /d %%a in (temp2*) do ( IF EXIST "\\10.10.10.20\marketing\logs\%%a\test.txt" echo "File exist" &&...
by sfgman63
26 Nov 2009 01:47
Forum: DOS Batch Forum
Topic: IF EXIST with wildcards
Replies: 2
Views: 13453

IF EXIST with wildcards

I'm trying to create a batch file using IF EXIST that searches for a specified file. The sub directory name changes everyday. If the sub directory name is hard coded then it works. I tried using a wild card for the sub directory and it doesn't work. Is it possible to use wild cards in this situation...