Search found 5 matches

by suresh_knv
30 Jan 2013 08:06
Forum: DOS Batch Forum
Topic: [Help] Create folder with earlier
Replies: 2
Views: 3048

Re: [Help] Create folder with earlier

Hi, @ECHO OFF set input2=-1 SET cDays=%input2% set /a GMonth=%Date:~3,2% set /a GDay=%Date:~0,2% set /a GYear=%Date:~6,4% :: Convert the parsed Gregorian date to Julian CALL :JDate %GMonth% %GDay% %GYear% :: Add or subtract the specified number of days IF "%cDays:~0,1%"=="-" ( SE...
by suresh_knv
29 Jan 2013 00:10
Forum: DOS Batch Forum
Topic: Variables inside a path?
Replies: 5
Views: 5121

Re: Variables inside a path?

hi,
May be this code may be helpful which uses a variable to access the path

@echo off
set /a num=1
cd "minecrafts\%num%\abc"
pause
set /a num=1+1
cd "minecrafts\%num%\abc"

here i am using num variable in the path this way we can acess the folders
by suresh_knv
25 Jan 2013 02:47
Forum: DOS Batch Forum
Topic: How to jump to the root directory from current directory
Replies: 11
Views: 13049

Re: How to jump to the root directory from current directory

cd .. is the best command to use to get to the just above parent folder and cd \ is used to get to the drive letter as mentioned above...
by suresh_knv
24 Jan 2013 23:52
Forum: DOS Batch Forum
Topic: Reading Columns & Output
Replies: 44
Views: 29278

Re: Reading Columns & Output

hi, delims=* makes the delimiter for the tokens to * which is not in the file so it takes complete sentence in 1 token and it doesnt break in to columns May be you may try this it works @echo off FOR /F "usebackq tokens=1-5,* delims=" %%i in ("c:\temp1\FileCheck.txt") do @echo %%...
by suresh_knv
21 Jan 2013 09:07
Forum: DOS Batch Forum
Topic: How to escape 2>nul [solved]
Replies: 4
Views: 5247

Re: How to escape 2>nul

Hi abc0502, Echo.FOR /F "tokens=2" %%%%a IN ^('TASKLIST /nh /fi "imagename eq cmd.exe" 2^^^>nul'^) DO SET Mpid=%%%%a There is no rule of four ^ or four % for every special character to be printed we need 1 ^ before the special character here for > this to be printed we need ^> an...