Search found 63 matches

by budhax
09 Jun 2008 16:52
Forum: DOS Batch Forum
Topic: A CMD,BAT script launcher
Replies: 1
Views: 6698

A CMD,BAT script launcher

Hello, I used to add "EXIT" command at the end of my CMD scripts. 1. Is it good or bad ? Here is bellow a CMD/BAT script launcher (Launcher.cmd). It works fine but, if the selected launched script contains the EXIT command, the launcher process is killed (too) by this command. So, I cannot...
by budhax
08 Jun 2008 17:08
Forum: DOS Batch Forum
Topic: Remove a printer / apply "List Mode view" for ALL
Replies: 0
Views: 7555

Remove a printer / apply "List Mode view" for ALL

Hello,
On MS Windows Vista, is there a way (using DOS command):
1. to remove a printer (Start menu > C.Panel > Printers) ?
2. to apply "List Mode view" (in Win. Explorer) for ABSOLUTELY all folders of any kind (contact, picture, video, myfolders, ...)?

Thanks and regards.
by budhax
10 May 2008 16:37
Forum: DOS Batch Forum
Topic: Make a script independent of the System drive letter
Replies: 1
Views: 5681

Make a script independent of the System drive letter

Hello, In some case, the "System drive letter" is different of C:, and a script can use an absolute path like C:\folder\bla. So, this script cannot works if MS Windows is installed in a difference drive letter of C: Here is a script using an absolute path in the C: drive (where C: is the S...
by budhax
14 Apr 2008 16:29
Forum: DOS Batch Forum
Topic: 1.Can a subroutine return a value? Yes. 2.Left/Right cut a s
Replies: 0
Views: 8272

1.Can a subroutine return a value? Yes. 2.Left/Right cut a s

Hello, Can a DOS subroutine return a value? Yes, sending to the subroutine the variable name to catch the returned value. See those 2 examples. Subroutine LeftCut returns the a string cut till the first left found character. Subroutine RightCut returns the a string cut till the first right found cha...
by budhax
29 Mar 2008 20:44
Forum: DOS Batch Forum
Topic: What is dropped on this batch: file or folder? (a solution)
Replies: 2
Views: 6887

What is dropped on this batch: file or folder? (a solution)

ECHO.[%1] ECHO. IF /i "%1"=="" (ECHO.*** USAGE: DRAG ^& DROP a File or Folder on This BATCH! ) ELSE (IF EXIST "%1\" (ECHO.This is a Folder.) ELSE (ECHO.This is a File.)) Pause&EXIT The idea to distinguish folders and files is to ...
by budhax
29 Mar 2008 20:41
Forum: DOS Batch Forum
Topic: How to use a FOR loop to match items of 2 "array"
Replies: 3
Views: 8244

Thanks a lot DosItHelp.
Another solution: http://www.ss64.org/viewtopic.php?id=340
by budhax
25 Mar 2008 04:41
Forum: DOS Batch Forum
Topic: How to use a FOR loop to match items of 2 "array"
Replies: 3
Views: 8244

How to use a FOR loop to match items of 2 "array"

Hello, is it possible to do this mapping: IF NOT EXIST "S:\" NET USE S: \\192.168.100.11\SHARED IF NOT EXIST "J:\" NET USE J: \\192.168.100.11\SHARED\08.JOBS IF NOT EXIST "P:\" NET USE P: \\192.168.100.11\SHARED\00.PERSO\ALP using a FOR loop and 2 variables: SET drivers...
by budhax
04 Mar 2008 10:11
Forum: DOS Batch Forum
Topic: Backup a folder's tree structure. Then rebuilt the tree from
Replies: 0
Views: 7839

Backup a folder's tree structure. Then rebuilt the tree from

This script backups (as DOS commands), a folder's tree structure. Then use the built script "Flat2Tree.cmd" to rebuild the folder's tree structure from all files in the root level. Is that clear what I'm saying to explain ?? - Of course, it ignores files located in the root level. - All fi...
by budhax
01 Mar 2008 08:32
Forum: DOS Batch Forum
Topic: Collect/Merge URL string from Korean I.E. Favourites ??
Replies: 0
Views: 7800

Collect/Merge URL string from Korean I.E. Favourites ??

Hello, I got this I.E. favourites from Korea: m I would collect/merge all URL string from .url files (subdirectory too) to get (in URLs1.txt) this kind of result: http://www.domaineX.com http://www.domaineY.org http://www.domaineZ.net Only the domaine name (or full URL string). The difficulty is due...
by budhax
01 Mar 2008 07:58
Forum: DOS Batch Forum
Topic: How to slice the output of: FSUTIL FSINFO DRIVES
Replies: 1
Views: 7784

How to slice the output of: FSUTIL FSINFO DRIVES

Hello,
this command: FSUTIL FSINFO DRIVES
outputs something like:

Code: Select all

Drives: A:\ C:\ D:\


1. How to get drives list, one by line?

Code: Select all

A:\
C:\
D:\


2. How to get "Drives: A:\ C:\ D:\" in a variable's value?
Thank in advance.
by budhax
18 Feb 2008 21:45
Forum: DOS Batch Forum
Topic: Play a basic sound in DOS promt (Batch file)
Replies: 6
Views: 44545

Play a basic sound in DOS promt (Batch file)

Using the DOS command TYPE for some files you can hear a sound, then (in some cases) the process displaying the file's content stops (few characters later). This is my start point idea to play a sound in DOS. From an Excel file (.xls) I extracted a character playing a sound, and I surrounded it by l...
by budhax
18 Jul 2007 16:10
Forum: DOS Batch Forum
Topic: Access path with percent char: C:\PHOTOSHOP\CSDATA\%AppData%
Replies: 3
Views: 10852

Sorry,
It doesn't work. But this works fine:

Code: Select all

SET FoldPC=C:\Program Files\Adobe\PHOTOSHOP\CSDATA\%%AppData%%\Adobe\Adobe Photoshop CS3\Adobe Photoshop CS3 Settings
DIR "%FoldPC%"
CD "%FoldPC%"
DIR
Pause


So, use %% instead of single % in path using %

Thanks anyway.
by budhax
16 Jul 2007 16:51
Forum: DOS Batch Forum
Topic: Access path with percent char: C:\PHOTOSHOP\CSDATA\%AppData%
Replies: 3
Views: 10852

Access path with percent char: C:\PHOTOSHOP\CSDATA\%AppData%

Hello, Some portable softwares have sub-folders named like %AppData% i.e. percent char in the name. Portable Adobe Photoshop CS3 Standard (folder structure) _ CSDATA __ %AppData% ___ Adobe ____ Adobe Photoshop CS3 _____ Adobe Photoshop CS3 Settings _____ - Actions Palette.psp (19.65 kilobyte) _____ ...
by budhax
05 Jul 2007 10:43
Forum: DOS Batch Forum
Topic: how to catch the last level name folder ?
Replies: 3
Views: 9739

Sorry DosItHelp, In fact, my question was "wrong". I just would create an HTML file with links based on URL files in the tree folder. Where the BAT is in the root of this tree. AND the parent folder name containing a URL file, is added just befor the HTML link. I found a solution: SET z=%~PD0LiNKS.h...
by budhax
26 Jun 2007 10:36
Forum: DOS Batch Forum
Topic: how to catch the last level name folder ?
Replies: 3
Views: 9739

how to catch the last level name folder ?

Hello, Last level folder= folder that have no sub folder. Here is the script putting links of .URL files (web page shortcut) in a links.html file, from the current folder and sub folders. Url2Htm.bat @ECHO OFF SET z=%~PD0Links.hTM TYPE NUL>"%z%" (FOR /F "Tokens=1,2,* Delims=:=&quo...