Search found 187 matches
- 12 Apr 2012 10:06
- Forum: DOS Batch Forum
- Topic: Unzip or Unrar files with Batch file?
- Replies: 21
- Views: 27587
Re: Unzip or Unrar files with Batch file?
Fawers, Winrar will only be there if the user has installed it, right? I said that assuming he's got it. Where did you say that? I said that: There should be a file called "rar.exe" in your %programfiles%\WinRAR folder. CD (or PUSHD) (...) assuming he has got WinRAR installed already. to ...
- 12 Apr 2012 09:39
- Forum: DOS Batch Forum
- Topic: Unzip or Unrar files with Batch file?
- Replies: 21
- Views: 27587
Re: Unzip or Unrar files with Batch file?
foxidrive wrote:Fawers, Winrar will only be there if the user has installed it, right?
I said that assuming he's got it.
- 12 Apr 2012 09:19
- Forum: DOS Batch Forum
- Topic: copy file & rename
- Replies: 15
- Views: 9076
Re: copy file & rename
Anyways, this should do it: @echo off set fname=car.vtx set pth= set n=1 :CopyLoop if [%n%]==[2] set fname2=%fname:~0,3%.dx80.%fname:~-3% if [%n%]==[3] set fname2=%fname2:80=90% copy [/b] %fname% "%pth%.\%fname2%" if [%n%]==[3] exit /b set /a n+=1 goto CopyLoop Just don't forget to: 1) set...
- 12 Apr 2012 09:11
- Forum: DOS Batch Forum
- Topic: New Batch scripter, Please help.
- Replies: 11
- Views: 6959
Re: New Batch scripter, Please help.
Dewars wrote:Comes up with the error "The fsutil utility requires you have administrative privileges"
Can you run CMD as an administrator? If yes, do it and run the code again.
- 12 Apr 2012 09:09
- Forum: DOS Batch Forum
- Topic: copy file & rename
- Replies: 15
- Views: 9076
Re: copy file & rename
What is the path you want it to be copied to?
And is this .vtx file a binary file?
And is this .vtx file a binary file?
- 12 Apr 2012 09:05
- Forum: DOS Batch Forum
- Topic: Unzip or Unrar files with Batch file?
- Replies: 21
- Views: 27587
Re: Unzip or Unrar files with Batch file?
There should be a file called "rar.exe" in your %programfiles%\WinRAR folder.
CD (or PUSHD) your DOS window into it and type
It'll return all the command line parameters to you.
Done that, you shall then tell us what exactly you want in your batch file.
CD (or PUSHD) your DOS window into it and type
Code: Select all
rar.exe /?
It'll return all the command line parameters to you.
Done that, you shall then tell us what exactly you want in your batch file.
- 12 Apr 2012 09:00
- Forum: DOS Batch Forum
- Topic: How set name of batch as variable
- Replies: 12
- Views: 8594
Re: How set name of batch as variable
darioit wrote:can I wrote 2> also into a variable?
I think so, but you'd have to escape the > sign.
Code: Select all
2^>
- 11 Apr 2012 15:07
- Forum: DOS Batch Forum
- Topic: Macros for CMD?
- Replies: 2
- Views: 2406
Macros for CMD?
Hello everybody.
I'm going straight to the point.
I've never used a macro. Thus I don't know what it is, and how it works on an environment.
Tell me,
what are they used for?
how can I create them with DOSKEY?
once created, how do I use them?
DOSKEY /? couldn't provide me a straight answer.
I'm going straight to the point.
I've never used a macro. Thus I don't know what it is, and how it works on an environment.
Tell me,
what are they used for?
how can I create them with DOSKEY?
once created, how do I use them?
DOSKEY /? couldn't provide me a straight answer.
- 11 Apr 2012 14:26
- Forum: DOS Batch Forum
- Topic: Convert current directory to DOS 8.3-friendly shortname
- Replies: 7
- Views: 5696
Re: Convert current directory to DOS 8.3-friendly shortname
Does anyone know under what circumstances this wont work? Is this the best know way to reliably get the current directory as a short name? Thanks a million! Well I've managed to write a script to echo a short path to a .tmp file and start it with notepad. You can then copy the text and, right after...
- 11 Apr 2012 14:07
- Forum: DOS Batch Forum
- Topic: Convert current directory to DOS 8.3-friendly shortname
- Replies: 7
- Views: 5696
Re: Convert current directory to DOS 8.3-friendly shortname
aGerman wrote:Code: Select all
for %%i in ("%cd%") do echo %%~s0
Shouldn't it be "%%~si"?
Edit: Nevermind. You edited it already.
- 11 Apr 2012 10:03
- Forum: DOS Batch Forum
- Topic: Need to add a space between filename and date
- Replies: 3
- Views: 3522
Re: Need to add a space between filename and date
Whenever you want a file to have spaces on its name, you have to enclose it in quotes. Try this: ren c:\test\test.txt "test1 %date:~4,2%-%date:~7,2%-%date:~10%.txt" Personally, I see no reason to enclose the original filename (c:\test\test.txt) in quotes, but most people say that it's good...
- 11 Apr 2012 09:54
- Forum: DOS Batch Forum
- Topic: Want to move all subfolders to one level up
- Replies: 6
- Views: 8342
Re: Want to move all subfolders to one level up
When I tried this batch file All my Floder 1, Folder 2, Folder 3,Folder 4 or moving to XYZ without their subdirectories . But I need All Subdirectories to be moved to XYZ without Folder 1,2,3,4. Your help will be appreciated. Are the subdirectories empty? The xcopy command is set to move subdirecto...
- 11 Apr 2012 06:55
- Forum: DOS Batch Forum
- Topic: Want to move all subfolders to one level up
- Replies: 6
- Views: 8342
Re: Want to move all subfolders to one level up
Untested: @echo off setlocal enabledelayedexpansion cd /d H:/wavz&Rex/XYZ for /f "delims=" %%A in ('dir /b /ad') do ( set fldrname=%%~nA if not exist "..\!fldrname!" md "..\!fldrname!" xcopy /s /e /i /h /-y "%%A\*.*" "..\!fldrname!"&&^ se...
- 10 Apr 2012 20:13
- Forum: DOS Batch Forum
- Topic: Variable won't expand
- Replies: 8
- Views: 5564
Re: Variable won't expand
Though now that I think about it, the outer variable is what is failing to expand, not the inner variable - I need to correct my original post Did you try to check whether the parameters on the CALL command are working? Remember you can always do this check with if [%N] == [] goto :ERROR where N is...
- 10 Apr 2012 19:16
- Forum: DOS Batch Forum
- Topic: Variable won't expand
- Replies: 8
- Views: 5564
Re: Variable won't expand
Personally, I see no reason for your program to not work. It seems that your only problem is that variable one. Mate, I'd change this line for /l %%a in (0,1,%len%) do if "!str:~0,1!"=="!char!" set "str=!str:~1,%len%!" to this for /l %%a in (0,1,%len%) do if "%str:...