Search found 378 matches

by !k
02 Apr 2010 07:59
Forum: DOS Batch Forum
Topic: create FOLDER shortcut & open it
Replies: 6
Views: 6450

Re: create FOLDER shortcut & open it

md creates FOLDER but not shortcut.

If you need to create FOLDER use

Code: Select all

md "c:\reports\january\thisfolder"
start "" "c:\reports\january\thisfolder"


If you need to create shortcut go to Create folder shortcuts using bat
by !k
02 Apr 2010 07:38
Forum: DOS Batch Forum
Topic: set CD (current directory) to permanent as desktop
Replies: 2
Views: 3639

Re: set CD (current directory) to permanent as desktop

Code: Select all

@echo off
cd /d %USERPROFILE%\Desktop
copy *.txt "d:\destination"
by !k
02 Apr 2010 07:27
Forum: DOS Batch Forum
Topic: get text string from a ref.txt
Replies: 2
Views: 3481

Re: get text string from a ref.txt

Code: Select all

@echo off
for /f "usebackq delims=" %%a in ("ref.txt") do cd /d "%%a"
copy *.doc "d:\destination"
by !k
02 Apr 2010 07:17
Forum: DOS Batch Forum
Topic: display full path when only certain files are searched
Replies: 3
Views: 5337

Re: display full path when only certain files are searched

Code: Select all

for /f "delims=" %%a in ('findstr /g:search_list.txt random_list.txt') do dir /s /b "%%~fa" > fullpath.txt

Use /? key for help.
by !k
01 Apr 2010 11:37
Forum: DOS Batch Forum
Topic: Create folder shortcuts using bat
Replies: 4
Views: 5393

Re: Create folder shortcuts using bat

jamesfui wrote:Sorry how to you use the shortcut.exe?
cmd /k shortcut.exe -?
jamesfui wrote:does it support windows 7 32bit?
I don't know
jamesfui wrote:And can bat create FOLDER shortcut?
shortcut.exe -t "D:\FOLDER"
by !k
31 Mar 2010 08:23
Forum: DOS Batch Forum
Topic: Create folder shortcuts using bat
Replies: 4
Views: 5393

Re: Create folder shortcuts using bat

1) shortcut.exe
2) start "" "d:\path\your link.lnk"
by !k
31 Mar 2010 08:03
Forum: DOS Batch Forum
Topic: ignore the > in echo?
Replies: 2
Views: 3646

Re: ignore the > in echo?

echo dir /s /b *.doc "c:\user\desktop\" ^> received_list.txt >> checklist.bat
by !k
21 Mar 2010 04:05
Forum: DOS Batch Forum
Topic: batchfile change line
Replies: 2
Views: 4445

Re: batchfile change line

dani8190
You can use an external utility sed (GNU and super-sed versions is guaranteed) with a key --in-place
by !k
14 Mar 2010 05:20
Forum: DOS Batch Forum
Topic: Unusual? Script.
Replies: 2
Views: 4439

Re: Unusual? Script.

1. wget
2. IrfanView
by !k
08 Mar 2010 11:49
Forum: DOS Batch Forum
Topic: Extract Data
Replies: 3
Views: 4942

Re: Extract Data

Parameters from %1 to %9 ? :?
by !k
25 Feb 2010 17:22
Forum: DOS Batch Forum
Topic: Just for fun - cmd animation
Replies: 3
Views: 25491

Re: Just for fun - cmd animation

Yes, you are bad use of googleing.

Code: Select all

@echo off
setlocal enableextensions enabledelayedexpansion
for %%f in (*.txt) do (
cls &color !random:~0,1!!random:~-1!
type "%%f"
ping localhost -n 2 >nul
)
cls &color
echo That's All Folks!
by !k
25 Feb 2010 02:11
Forum: DOS Batch Forum
Topic: If specific text found in file, del file
Replies: 3
Views: 4363

Re: If specific text found in file, del file

Code: Select all

for /f "delims=" %%f in ('findstr /m /c:"a specific text" "d:\path\*.txt"') do del "%%~ff"

Sure to use the path or extension, because this code also contains a "a specific text" and the batch file will erase itself
by !k
24 Feb 2010 04:17
Forum: DOS Batch Forum
Topic: If specific text found in file, del file
Replies: 3
Views: 4363

Re: If specific text found in file, del file

find /i "a specific text" file.txt && del file.txt /q
or
findstr /r /c:"[Aa] [Ss]pecific [Tt]ext" file.txt && del file.txt /q
findstr can use regular expressions
by !k
23 Feb 2010 03:06
Forum: DOS Batch Forum
Topic: Batch unzip
Replies: 9
Views: 8905

Re: Batch unzip

Try to use the full path to 7z.exe
Image
by !k
22 Feb 2010 18:21
Forum: DOS Batch Forum
Topic: Batch unzip
Replies: 9
Views: 8905

Re: Batch unzip

Quite so.

Code: Select all

7z e "d:\full path\archive.zip" -o"%cd%" *.* -r