Search found 4332 matches

by Squashman
13 May 2012 00:07
Forum: DOS Batch Forum
Topic: REG EXPORT: Hex returned?
Replies: 1
Views: 4745

Re: REG EXPORT: Hex returned?

REM Win7 64-bit REM real path REG EXPORT "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" REM Hex path REG EXPORT "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" On my machine, both registry keys conta...
by Squashman
12 May 2012 23:42
Forum: DOS Batch Forum
Topic: How to sort numbers in a text file?
Replies: 19
Views: 22304

Re: How to sort numbers in a text file?

It turned out being easier to just change a single line. Surprisingly this worked! If I wasn't able to find such a quick solution, I would have to abandon using the forfiles command and add more lines of code to take it's place. for /f tokens^=1^,2^ eol^=^"^ delims^=^" %%a in (files.txt) ...
by Squashman
12 May 2012 23:30
Forum: DOS Batch Forum
Topic: How to sort numbers in a text file?
Replies: 19
Views: 22304

Re: How to sort numbers in a text file?

Well you could have changed a single byte in your FORFILES command that was creating the text file. If you were using FORFILES to echo @FILE and @FSIZE, you could have just put a comma in between them and then the original batch file that was written for you could have been changed to just use a com...
by Squashman
12 May 2012 22:06
Forum: DOS Batch Forum
Topic: How to sort numbers in a text file?
Replies: 19
Views: 22304

Re: How to sort numbers in a text file?

Why not change the way the output of your text file is created and put a true delimiter into the text file to separate the file name from the file size.
by Squashman
11 May 2012 06:17
Forum: DOS Batch Forum
Topic: rename all files excep today files and transfer over network
Replies: 8
Views: 6200

Re: rename all files excep today files and transfer over net

priya171 wrote:Thanks but my all files are in c:\data\ so where i have to mention the directory path in batch file

If you put the batch file in C:\data you don't have to put the path in the batch file.

If you really want to put it in there then add it to the DIR command.
by Squashman
10 May 2012 05:52
Forum: DOS Batch Forum
Topic: Batch script to fix wmi - urgent
Replies: 48
Views: 43162

Re: Batch script to fix wmi - urgent

I don't want to do it manually. I want is all automatic in silent without any user interaction. I got this in the screen when I run the batch that foxidrive give. ERROR: Access denied TASKKILL /PID ERROR: Invalid syntax. Value expected for '/PID'. Type "TASKKILL /?" for usage. Press any k...
by Squashman
10 May 2012 05:48
Forum: DOS Batch Forum
Topic: how to copy several files to somewhere?
Replies: 9
Views: 10329

Re: how to copy several files to somewhere?

I suppose you could do this as well.
copy a.txt T:\ & copy a.jpg T:\
by Squashman
10 May 2012 05:45
Forum: DOS Batch Forum
Topic: how to copy several files to somewhere?
Replies: 9
Views: 10329

Re: how to copy several files to somewhere?

Only way I can see to do it is with a FOR command.
for /F "tokens=*" %G in ('dir /a-d /b C:\a.txt C:\a.jpg') do copy %G D:\
by Squashman
10 May 2012 05:37
Forum: DOS Batch Forum
Topic: Newbi Help with Batch file
Replies: 10
Views: 10234

Re: Newbi Help with Batch file

Open up a cmd prompt and type: systeminfo
That will get you a few of the things you want.
by Squashman
09 May 2012 10:53
Forum: DOS Batch Forum
Topic: How To Detect User Interacting With Console vs. Auto Task
Replies: 16
Views: 16691

Re: How To Detect User Interacting With Console vs. Auto Tas

What if we did something like doing a SCHTASKS query and piping that to the FINDSTR command to find %0?
by Squashman
09 May 2012 07:49
Forum: DOS Batch Forum
Topic: Batch script ignores the parameters
Replies: 4
Views: 5308

Re: Batch script ignores the parameters

Change the redirection to this. >>%PARAM_FILE% echo $$PROCESS_NUMBER=%PROCESS_NUMBER% >>%PARAM_FILE% echo $$RUN_NUMBER=%RUN_NUMBER% >>%PARAM_FILE% echo $$%PARAM_NAME_1%=%PARAM_VALUE_1% >>%PARAM_FILE% echo $$%PARAM_NAME_2%=%PARAM_VALUE_2% >>%PARAM_FILE% echo $$%PARAM_NAME_3%=%PARAM_VALUE_3% >>%PARAM_...
by Squashman
08 May 2012 16:03
Forum: DOS Batch Forum
Topic: If date is older than 30 days
Replies: 5
Views: 4540

Re: If date is older than 30 days

If you are referring to file dates you could use Forfiles. Believe it works for older and newer with the /D switch.
/D +30
/D -30
by Squashman
08 May 2012 07:10
Forum: DOS Batch Forum
Topic: Copy folders with filename
Replies: 10
Views: 12124

Re: Copy folders with filename

prash11, I think the point of the exercise is to process all the files and directories in one execution of the batch file. Your solution only processes one directory at a time. If you had a 100 folders like this would you want to copy your batch file into each folder or edit the batch file to change...
by Squashman
08 May 2012 05:51
Forum: DOS Batch Forum
Topic: Copy folders with filename
Replies: 10
Views: 12124

Re: Copy folders with filename

@echo off cd blue FOR %%G IN (*_imp.png) DO ( echo file found...! echo %%~nG > file.txt FOR /F "delims=_" %%M IN (file.txt) DO ( echo %%M cd.. mkdir %%M move /y blue\*.png %%M\ echo y | del blue ) ) rmdir blue and make sure you run this program from outside blue folder. suppose you have b...
by Squashman
07 May 2012 16:01
Forum: DOS Batch Forum
Topic: Check for value
Replies: 15
Views: 11464

Re: Check for value

foxidrive wrote:FWIW this line is missing a trailing double quote "

set "data=!data!%separator%!member%%i!

I thought you had bad eyes.... :D