Search found 237 matches

by DosItHelp
03 Dec 2009 23:09
Forum: DOS Batch Forum
Topic: FTP list
Replies: 9
Views: 10646

codemonkey, This little batch should get you the list of directories and show them as a menu with numbers in front of each directory name. The user can then chose a number. The number is resolved to the directory name and shown on the screen. Not that the ftp script is embedded into the batch script...
by DosItHelp
21 Nov 2009 16:29
Forum: DOS Batch Forum
Topic: Parse For /F
Replies: 3
Views: 5122

tom4tp, you could try the (new) :getIPConfig function. It returns an array of all ipconfig output, from there you can access what you need. @echo off call:getIPConfig arr echo.%arr[1].IPAddress% echo.%arr[2].IPAddress% echo.%arr[3].IPAddress% goto:eof rem copy :getIPConfig function from http://www.d...
by DosItHelp
14 Nov 2009 23:18
Forum: DOS Batch Forum
Topic: Need help to FTP data automatically for the day using batch
Replies: 9
Views: 10335

JerzyPiotr, I suspect the :jdate function doesn't work correctly for systems with PL as system locale. The :jdate function uses the date command to retrieve the year, month and day. On a US system the date function output looks like this: C:\>date The current date is: Sat 11/14/2009 Enter the new da...
by DosItHelp
13 Nov 2009 00:50
Forum: DOS Batch Forum
Topic: Need help to FTP data automatically for the day using batch
Replies: 9
Views: 10335

dosnovice, Here is a batch with embedded FTP script that gets a file with yesterday's time stamp. @ECHO OFF call:jdate JD set /a JD-=1 call:jdate2date JD YYYY MM DD call:ExtractSimple :StartFtp >"%temp%\%~n0.ftp" notepad "%temp%\%~n0.ftp" rem ftp -i -s:"%temp%\%~n0.ftp"...
by DosItHelp
11 Nov 2009 23:54
Forum: DOS Batch Forum
Topic: need hlp creating batch file
Replies: 2
Views: 4674

meangean,

This is not a straight answer but hope it helps.

From command line run:
rundll32 printui.dll,PrintUIEntry /?

There are tons of options. If you figured it out post the answer here.
:wink:
by DosItHelp
11 Nov 2009 20:12
Forum: DOS Batch Forum
Topic: Need help to FTP data automatically for the day using batch
Replies: 9
Views: 10335

dosnovice You can use teh julan days conversion to get the YYYY MM DD from yesterday: @ECHO OFF call:jdate JD set /a JD-=1 call:jdate2date JD YYYY MM DD echo.D%YYYY%%MM%%DD%*.csv GOTO:EOF rem Functions go below here rem copy :jdate from m rem copy :jdate2date from m Output: D20091110*.csv DosItHelp?
by DosItHelp
24 Aug 2009 21:16
Forum: DOS Batch Forum
Topic: How do I determine the number of arguments?
Replies: 7
Views: 9997

ldrechsler,

Try:

Code: Select all

set var1=%~1
set var2=%~2
set var3=%~3
set var4=%~4
set var5=%~5

echo.var1 is %var1%
echo.var2 is %var2%
echo.var3 is %var3%
echo.var4 is %var4%
echo.var5 is %var5%


DOS IT HELP? :wink:
by DosItHelp
10 Aug 2009 22:00
Forum: DOS Batch Forum
Topic: help with using substr
Replies: 8
Views: 10006

There is something fishy going on with the output of fsutil, see earlier post for details: http://www.dostips.com/forum/viewtopic.php?t=230 Here is a function to choose a drive: @echo off call:DriveChoice dr echo.Your choice: '%dr%' goto:eof :DriveChoice drive SETLOCAL ENABLEDELAYEDEXPANSION set /a ...
by DosItHelp
10 Aug 2009 20:33
Forum: DOS Batch Forum
Topic: dir list, delay, no tmp files . . ?
Replies: 1
Views: 3843

LOL :)
by DosItHelp
14 Apr 2009 00:15
Forum: DOS Batch Forum
Topic: what is %~f0
Replies: 4
Views: 23925

In other words:
%~f0 - resolves to the full name of the currently executing batch file.
:wink:
by DosItHelp
30 Mar 2009 21:54
Forum: DOS Batch Forum
Topic: Help to code loop script
Replies: 7
Views: 10458

bex,

Remove the spaces behind the variables during value assignment. For example:
set var=nospace
set var =space
echo.%var%
echo.%var %
The command interpreter sees two different variables and echoes:
nospace
space


DosItHelp? :wink:
by DosItHelp
28 Mar 2009 23:23
Forum: DOS Batch Forum
Topic: [Solved]jdate doesn't work with custom regional settings????
Replies: 2
Views: 5375

avery_larry,

Good thinking!
The functions :jdate and :date2jdate have been corrected to support 2 digit years by adding 2000.
Give it a try and let me know of the :jdate function now works for you.
http://www.dostips.com/DtCodeCmdLib.php#jdate

Thanks,
DosItHelp
by DosItHelp
22 Mar 2009 23:13
Forum: DOS Batch Forum
Topic: How to extract Day of Week
Replies: 6
Views: 27064

Alternatively use Julian days modulo seven to look up a string like this: @Echo Off call:jdate JD set /a d=1+(JD%%7) for /f "tokens=%d%" %%A in ("MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY SUNDAY") do echo.%%A GOTO:EOF ::------------------------------------...
by DosItHelp
22 Mar 2009 22:44
Forum: DOS Batch Forum
Topic: Regional settings and dates issue (found in ftime)
Replies: 1
Views: 4449

onionfx, You should name yourself hero not onion. The corrected :ftime function has been uploaded. I also fixed the function comment, which was bogus, and made changes to improve the performance when default 'last file write' time is used, by preventing calls to 'dir' and 'findstr' altogether. Many ...
by DosItHelp
24 Feb 2009 20:15
Forum: DOS Batch Forum
Topic: where is cl.bat?
Replies: 1
Views: 4428

faust, cl.bat is not available any more. Sorry for the confusion. The reference has been removed from the site. All functions that were previously available in cl.bat are listed separately here: http://www.dostips.com/DtCodeCmdLib.php Hope this helps, and thanks for pointing this out. DosItHelp