Search found 23 matches

by DccD
30 Dec 2009 18:09
Forum: DOS Batch Forum
Topic: Make .M3U master playlist - output as relative path names
Replies: 28
Views: 44531

If you want to make the batch list files from different locations (c:\Music, d:\MP3s, etc) then you can previously make a list of all these locations then use a FOR loop to repeat the action for each of them. Depending on your use you can put that list inside the same batch or create a separate file...
by DccD
06 Sep 2009 23:57
Forum: DOS Batch Forum
Topic: Moving Folders within a Folder
Replies: 2
Views: 5037

The move command can only move files and rename folder. I think you need to use XCOPY then erase the original folder with the RD command
by DccD
06 Sep 2009 23:26
Forum: DOS Batch Forum
Topic: Page code 437 vs. 850
Replies: 12
Views: 19565

According to your dbasedos.ini file the language driver loaded is DB437ES1 which looks like a 437 page code. If you could find a file named DB850ES1 or similar then you might replace it in the dbasedos.ini file.
by DccD
01 Sep 2009 21:36
Forum: DOS Batch Forum
Topic: Combining 2 Batch Files with a Loop
Replies: 6
Views: 9001

I'm glad everything is working now Just the be "more" perfect, the "wait" can be achieved several ways... using PING: ping -n 4 127.0.0.1 >nul or using the SLEEP command if you run Windows Server Usage: sleep time-to-sleep-in-seconds sleep [-m] time-to-sleep-in-milliseconds sleep...
by DccD
01 Sep 2009 20:45
Forum: DOS Batch Forum
Topic: Page code 437 vs. 850
Replies: 12
Views: 19565

Does this help you?

Code: Select all

http://ss64.com/nt/chcp.html


Or maybe your problem is the same exposed here:

Code: Select all

http://www.geocities.com/geoff_wass/dBASE/GaryWhite/dBASE/FAQ/qcp.htm
by DccD
01 Sep 2009 20:26
Forum: DOS Batch Forum
Topic: What does... RUN FILENAME in a Batch File mean ?
Replies: 1
Views: 4117

AFAIK run is not a DOS command. Maybe it is an executable file (.exe or .com). In that case it must be in the same directory where the batch is started or in the PATH. Try to search for any run.* file.
by DccD
01 Sep 2009 18:33
Forum: DOS Batch Forum
Topic: Combining 2 Batch Files with a Loop
Replies: 6
Views: 9001

I see, this is because of the EXIT command. This one should work: echo off set "sourcedir=D:\BC250_IN" set "destdir=D:\BC250_OUT" cd /d "%sourcedir%" :: Count the number of PDF files set numbfile=0 FOR /F "tokens=*" %%A IN ('dir /b *.pdf 2^>nul') do &#...
by DccD
01 Sep 2009 16:04
Forum: DOS Batch Forum
Topic: Combining 2 Batch Files with a Loop
Replies: 6
Views: 9001

I'm not sure to understand what you already did but I would create a batch file named LOADER.BAT with the following code: @echo off call script1.bat call script2.bat Then make that LOADER.BAT start from a scheduled task every minute. And repeat all this per folder needed to be processed. Does it mak...
by DccD
01 Sep 2009 15:38
Forum: DOS Batch Forum
Topic: Make .M3U master playlist - output as relative path names
Replies: 28
Views: 44531

hmmm... I'm still working on this... special characters are tough ! In the mean time here is the new code fixing a bug when started from the root of a drive: @ECHO OFF SET currentfolder="%cd%" CD .. SET upperfolder="%cd%" IF %upperfolder:~-2,-1%==\ SET upperfolder=%upperfolder:\=...
by DccD
31 Aug 2009 21:31
Forum: DOS Batch Forum
Topic: Move an exact quantity of files
Replies: 4
Views: 7009

Ok this should work now: @echo off set "sourcedir=C:\source" set "destdir=C:\dest" cd /d "%sourcedir%" :: Count the number of PDF files set numbfile=0 FOR /F "tokens=*" %%A IN ('dir /b *.pdf 2^>nul') do (set /A numbfile+=1) if %numbfile% LSS 8 ...
by DccD
31 Aug 2009 18:53
Forum: DOS Batch Forum
Topic: Move an exact quantity of files
Replies: 4
Views: 7009

I'm not sure if this complies with all your needs but it should get close to it @echo off set "sourcedir=C:\source" set "destdir=C:\dest" cd /d "%sourcedir%" set counter=0 set numb= for %%a in (*.pdf) do call :loop "%%~a" goto :eof :loop set /A counter...
by DccD
30 Aug 2009 20:24
Forum: DOS Batch Forum
Topic: Newbie here needs help to manipulate file names
Replies: 11
Views: 14250

If I understood correctly you want the script to check for a 5-digit sequence at the beginning of the filename and, if only 4 digits present, add the missing digit between the fourth and fifth character (alpha here)? But how can we tell the script what digit to put? In your example the file somepic1...
by DccD
30 Aug 2009 20:00
Forum: DOS Batch Forum
Topic: for /f command?
Replies: 4
Views: 7470

You need to use the usebackq option in the FOR loop.

Code: Select all

FOR /F "usebackq tokens=1,2,* delims= " %%i in ("%path_filename%") do ...
by DccD
30 Aug 2009 19:55
Forum: DOS Batch Forum
Topic: Q on Set command format
Replies: 1
Views: 3945

I'm not sure why you put the excalamation (!) but this should work:

Code: Select all

set "alpha=%fname:~-1%"
by DccD
30 Aug 2009 17:47
Forum: DOS Batch Forum
Topic: Make .M3U master playlist - output as relative path names
Replies: 28
Views: 44531

This should fix the special characters issue: @ECHO OFF SET currentfolder="%cd%" CD .. SET upperfolder="%cd%" CALL SET folder=%%currentfolder:%upperfolder:"=%\=%% CD %folder% TITLE Generating Playlist for %folder% ECHO. ECHO Start time: %time:~0,-3% ECHO Please wait... FOR /...