Search found 211 matches

by thefeduke
12 Jul 2017 18:56
Forum: DOS Batch Forum
Topic: Batch file required to move rars and zips by any inside file date
Replies: 9
Views: 2033

Re: Batch file required to move rars and zips by any inside file date

OK. I have built no check on the validity of the argument as you pass it. You need to delete the target directory when you do the REMARK swap. @Echo Off & SetLocal Set "year=%~1" :: The desired year can be changed in the following line before each run If Not Defined year Set Year=2001 ...
by thefeduke
12 Jul 2017 11:43
Forum: DOS Batch Forum
Topic: Batch file required to move rars and zips by any inside file date
Replies: 9
Views: 2033

Re: Batch file required to move rars and zips by any inside file date

Is this the correct way of writing this batch file when you said "It requires the year as the first argument." The code I tried is this one you gave me( I replaed the first "year" word with the 2016 as shown: @Echo Off & SetLocal Set "2016=%~1" md %year%files @Echo...
by thefeduke
26 Jun 2017 13:51
Forum: DOS Batch Forum
Topic: Flags in programming
Replies: 7
Views: 1637

Re: Flags in programming

I recently wrote elsewhere: You attempted to use the /M and /e tags of findstr inappropriately. On examining the output of this utility, I found the year to be at the beginning of the line. The /m tag is for a filename that you are not actually searching. It appears that I should have said "fla...
by thefeduke
23 Jun 2017 22:52
Forum: DOS Batch Forum
Topic: Batch file required to move rars and zips by any inside file date
Replies: 9
Views: 2033

Re: Batch file required to move rars and zips by any inside file date

You sort of have the right idea and I had this third party software installed so you can try this untested code. It requires the year as the first argument. @Echo Off & SetLocal Set "year=%~1" md %year%files echo IN PROGRESS PLEASE WAIT for %%F in (*rar,*.zip) do "C:\Program Files...
by thefeduke
02 Jun 2017 15:11
Forum: DOS Batch Forum
Topic: Move cursor to *any position* using just ECHO command
Replies: 10
Views: 11346

Re: Move cursor to *any position* using just ECHO command

Please note that I have edited my previous reply. I have more comments here: . . . This program is just an example of how to use this method to move the cursor, . . . . . . I observed that the positioning only works if the positioning string is followed by one or more displayable characters. So this...
by thefeduke
29 May 2017 14:34
Forum: DOS Batch Forum
Topic: Move cursor to *any position* using just ECHO command
Replies: 10
Views: 11346

Re: Move cursor to *any position* using just ECHO command

This means that a generic "movecursor x y" subroutine that may work in all cases is just not possible, unless you always know the current cursor position that is the case in animation/game programs. However, you may send an enough number of BS's to the screen in order to assure that the c...
by thefeduke
26 May 2017 14:39
Forum: DOS Batch Forum
Topic: Using Findstr to Find Unique Data Between 2 Files
Replies: 2
Views: 1018

Re: Using Findstr to Find Unique Data Between 2 Files

You might find some ideas in http://www.dostips.com/forum/viewtopic.php?p=46881#p46881
The Post subject was: Re: Search in 1.txt for missing entrys from 2.txt
This was one approach:
Compo wrote:

Code: Select all

FindStr/VXG:"1.txt" "2.txt">output.txt
John A.
by thefeduke
26 May 2017 09:09
Forum: DOS Batch Forum
Topic: How to extract data from website?
Replies: 33
Views: 7173

Re: How to extract data from website?

so I made a separate file in which I placed your code and in my original file I wrote the command Start DownloadLinks.bat but still the same error. I don't know if something is wrong with my computer or what. The first operand of the start command is not the program name but the title of the starte...
by thefeduke
12 May 2017 16:19
Forum: DOS Batch Forum
Topic: How to extract data from website?
Replies: 33
Views: 7173

Re: How to extract data from website?

Here is the modification that you request for it Good work. This reply is directed more to you, than @PaperTronics. I don't know what editor you use but escaping those special characters using ECHO looks tedious. I favor a more WYSIWYG technique. I use it for most of my inline test files. Here is y...
by thefeduke
09 Feb 2017 14:59
Forum: DOS Batch Forum
Topic: Help on getting file size in proper manner
Replies: 9
Views: 2228

Re: Help on getting file size in proper manner

I ... slightly modified it in order to show the result with the proper units. I liked the script so much that I added this for my own use: rem Show the result with proper units set i=0 for %%a in (B KB MB GB TB PB EB ZB YB) do ( set "unit[!i!]=%%a" set /A i+=1 ) set i=0 for %%a in (Bytes ...
by thefeduke
30 Jan 2017 03:19
Forum: DOS Batch Forum
Topic: What is "=::" and does its value ever changes?
Replies: 13
Views: 4724

Re: What is "=::" and does its value ever change?

I did have a practical use for these variables. Here are some scraps from my archives. I lost track of where on DOStips I based them. @Echo Off :ExitInfo Echo( Echo(ExitInfo legacy list Echo(List of active drive Current Directories: Echo(========================================= :: Alternate list me...
by thefeduke
28 Jan 2017 00:48
Forum: DOS Batch Forum
Topic: obfuscated hello world won't print hello world
Replies: 4
Views: 1799

Re: obfuscated hello world won't print hello world

NunoLava1998 wrote:this gives an error or displays nothing
Remarkable code. So which is it? An undisclosed error or no display? Or does it act differently based on some external influences?
Oh, where is my tongue-in-cheek icon?
John A.
by thefeduke
27 Jan 2017 00:12
Forum: DOS Batch Forum
Topic: My batch file will close when I press enter
Replies: 3
Views: 1096

Re: My batch file will close when I press enter

You may have noticed that you are not seeing the percent signs in your displays.

You need to double them up when using ECHO.

For Example wrote:echo [[] ] Caricamento in corso (10%%)

John A.
by thefeduke
04 Jan 2017 17:29
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 157
Views: 36387

Re: Creating a script to gather PC information - to assist those asking for help

I am just starting to put a newly acquired LattePanda Windows 10 mini-PC through its paces. INFO.bat gave me an exception in the PATH: INFO.BAT version 1.2 -------------------------------------------------------------------------------- Windows version : Microsoft Windows [Version 10.0.10586] Produc...
by thefeduke
23 Nov 2016 12:26
Forum: DOS Batch Forum
Topic: Mouse-Selectable Menu from a data file - a/la CHOICE
Replies: 16
Views: 4740

Re: Mouse-Selectable Menu from a data file - a/la CHOICE

By the way, you did NOT confirmed that "GetInput is correctly working now" in your last reply. I suppose that "I am happy to report that my results were what I had hoped and you had expected" should mean the same thing. IMHO you should be much more concise and clear when describ...