Search found 59 matches

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: 3923

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: 4920

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: 4920

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: 3782

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: 3701

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: 4857

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: 27534

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: 6528

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: 6528

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: 5890

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: 5890

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...
by budhax
26 Jun 2007 10:29
Forum: DOS Batch Forum
Topic: execute a bat without closing the prompt command
Replies: 2
Views: 5813

just put "cmd" in the last line

hi,
just put "cmd" in the last line, like this .BAT

NoClosePrompt.bat

@echo off
echo hello mathmax
cmd
:: command below will be ignored
cls
by budhax
17 Jun 2007 11:42
Forum: DOS Batch Forum
Topic: A DOS command closing a "Windows Explorer" window?
Replies: 1
Views: 4962

A DOS command closing a "Windows Explorer" window?

Hello, Let's create a folder Folder1 in C:\ and open it (double-click or right-click > explore) this folder. Now we have a "MS Windows Explorer" window titled "C:\Folder1". Let's put in this Folder1 a file close.bat I would close the "Windows Explorer" window titled "C:\Folder1", double-clicking on ...
by budhax
03 May 2007 13:02
Forum: DOS Batch Forum
Topic: Remove duplicate file. Add filesize test.
Replies: 1
Views: 5317

Remove duplicate file. Add filesize test.

Hello, Here is a script that remove all files in Folder1 if this file exists in Folder2. So, it does something like: Folder1 - Folder2 in other words, it removes duplicate files. This script test only the filename: remove the file in Folder1 if the same filename is present in Folder2. I would to imp...
by budhax
31 Mar 2007 14:46
Forum: DOS Batch Forum
Topic: Build a html file from .URL files
Replies: 2
Views: 5662

Sure, thanks a lot.