Go Premium for a chance to win a PS4. Enter to Win

x

Microsoft DOS

13K

Solutions

12K

Contributors

Microsoft Disk Operating System (MS-DOS) was an operating system for x86-based personal computers, and traces of it are still found in the Windows operating system. DOS is still used in some embedded systems and for certain legacy 16-bit networks.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hello Experts,
how does make a bat file for continuous Ping multipal IP with background Colour changes ?
for example:-
start ping -t 192.168.207.11 -l 0
start ping -t 192.168.207.12 -l 0
start ping -t 192.168.207.13 -l 0
start ping -t 192.168.207.14 -l 0
start ping -t 192.168.207.15 -l 0
0
Get your Disaster Recovery as a Service basics
LVL 1
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

I have this old batch file that I used to upgrade a software and since it is time for another one I have tried creating a GPO and assigned it under User Configuration>Windows Settings>Logon.

But when testing with a user logging on the batch file wont run but when manually clicking the file it runs perfectly fine!

Here is the code:  xcopy "Source" "Destination" /S /C /I /H /R /Y

Users have a full time mapped drive from where the source file is copied to the local drive C:\Folder

Note that robocopy is the same and doesn't run automatically.
0
Hi Experts,

I have some tasks that currently users must do it manually in daily bases, however since this is prone to errors, the manager would like it should get automated done via code.

1- Look for specific file in default download folder that name starts with Tables_TodaysDate_LatestNumber.Zip (See attached).
2- Extract it to specific folder (C:\Application)
3- Delete old File C:\Application\Tables.MDB
4- Rename extracted file (something like Tables_2017-Oct-30_2230.mdb) to Tables.MDB

Would prefer it done either by calling some DOS commands from VBA or just using native VB functions if possible.

Thanks in advance.
Capture.PNG
0
I received an excellent response to my question of deleting files based on match and amount of days old.   Initially I was told they should delete based on age of file and if they have a matching .xxx file.    That has since changed to:   files should delete based on if there is a matching .xxx file and only if it is older than 3 days (regardless if the other files are older).  

The script help I received before from Bill Prew looks like:

@echo off
setlocal EnableDelayedExpansion

rem Define folder to process
set "BaseDir=C:\Users\ad9f2p\TEST CLEANUP"

rem Look at each .XXX file
for %%A IN ("%BaseDir%\*.xxx") do (

  rem Reset delete flag, and check all files with this same base filename
  set DeleteFlag=Y
  for %%B IN ("%BaseDir%\%%~nA.*") do (

    rem Get dyas since last modified (using VBS helper routine)
    set Fileage=0
    for /f "tokens=*" %%C in ('cscript //nologo fileage.vbs "%%~B"') do (
      set Fileage=%%C
    )

    rem If any file found less than 3 days old, do not delete the group
    if !FileAge! LEQ 3 (
      set DeleteFlag=N
    )
  )

  rem If all files found older than 3 days, delete them all
  if "!DeleteFlag!" EQU "Y" (
    ECHO del /q "%BaseDir%\%%~nA.*"
  )
)

Open in new window

Can I add a nested If statement to the section:

    rem If any file found less than 3 days old, do not delete the group
    if !FileAge! LEQ 3 (
      set DeleteFlag=N
    )

Open in new window

Can I check the file age on only the .xxx files and delete the corresponding files that match then, only if the .xxx file is older than 3 days?   I've tried doing this by rearranging the logic, currently it deletes everything with a .xxx file:    What am I missing here?


Open in new window

0
I'm trying to stream content using Livestreamer from YouTube to VLC. However, the streaming starts but the video is frozen. I notice no audio is present as well. Any ideas what It could be? I tried the smallest resolution 144p and I get the same results as if I try at 1080p.
0
Rename this sort of multiple file names
"20171014_user_id_17875988194160002_1507954651_replay.mp4"
to
"String1 user_id String2.mp4"

String user_id is dynamic in nature and not fixed and not known in advance
0
device driver not found BANANA
NO VALID CDROM device drivers selected

I had downloaded the ms dos 6.22 iso file and copy it into floppy by winimage but when I try to install ms dos it shows this error and in my system I don't have cdrom or dvdrom , I only have floppy drive with 500 mb hard disk.
0
Dear Experts,
We need codes for batch file to check a particular file is modify time is within last 30 Min.
If file is modified in last 30 Min then execute another batch file

Else end the script.

Requesting to help in the same.

Regards,
Girish T.
0
I will have several files during the day. Cannot select the latest with timestamp, i need to have to file with the greatest id.

The file name is in a format: [standardname]_[date]_[id].csv. Eg invoices_2017_09_19_186.csv
0
Looking to use a dir command in the prompt that will write a txt file that includes the below info for ALL files:

File Name/ File Path / Last Modified Date/ Creation Date / Modified By

This should go through the entire subfolder structure of the directory.
0
Veeam and MySQL: How to Perform Backup & Recovery
LVL 1
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Hi, We have a requirement as below

We  need a solution to extract the count of pages in a multipage TIFF file, which are available in Sub folders.

Thanks!
CPH
0
I would like a batch file to copy, lets say the word : magic.  After I double click on the batch file on my desktop, all I need to do is CTRL V anywhere for the word "magic" to be typed out.

Anyone knows how to do this?  Please assist.

Thank you !
0
I'm writing a batch file that needs to read In a text file with multiple lines (2-3 or more) and assign them to variables (i.e. Line1, Line2, Line3).  which will then act on those to run jobs based on the variables read in.  What is the easiest way to do this preferably without for loops or delims. etc.

Thx,
Brian
0
i want to create the Batch File to copy one file to another location & can i have complete list of  e.g /e /f /k or how to get this in cmd?

Thx..
0
We have a computer who is accessible by placing   '\\pc-name\j$'  in the Windows Explorer.  We also have that same location mapped using the command 'net use j: \\pc-name\j$'.

When in the command prompt we use   'Dir \\pc-name\j$'   or   'Dir J:\'   works excellently - total access.

However, if place   'J:\'   in the Windows Explorer or if we type   'start.', in order to open explorer at that point, it gives the following error:

WindowsExplorerLocationError



How can we successfully use Windows Explorer to access this   'J:\' ?
0
We have a folder called "Students" that contain student home directories.  Each year we empty them out.  I have the following file below that deletes files/folders within the users folder.  For example, we have 3 folders...

1john.doe
2jane.doe
3david.smith

So the batch file will go into the users folder and delete the contents within, but will not delete the home folder itself.  The problem is, there are some folders that do not begin with numbers and I don't want to delete the content within those folders.  How can I modify my batch file so that it will ignore folders that do not begin with numbers?

@echo off
setlocal EnableDelayedExpansion
set BaseDir=D:\Students\Users
for /D %%A in ("%BaseDir%\*") do (
  set PurgeDir=%%~fA
  del /Q /F "!PurgeDir!\*.*"
  for /D %%B in ("!PurgeDir!\*") do rmdir /Q /S "%%~fB"
)

Open in new window

1
i need to search for particular word "error" in log file that was created for last one hour (or) last hundred files.
0
Here is a solution to this problem - dated 2010.

https://www.experts-exchange.com/questions/25015022/Execute-Dos-app-from-delphi.html

I tried the functions ExecProcess and ExecWaitProcess - but they seem to no longer work under Delphi XE8

Here is my code:

var
  s1: string;
begin
  Screen.Cursor := crHourGlass;
  s1 := 'dir c:\*.* ';
//  ExecProcess(s1, True);
  ExecWaitProcess(s1, True);

  Memo1.Lines.Add(s1);
  Screen.Cursor := crDefault;
end;

Open in new window


Either they fail, or they complete instantly. Any better solutions?
0
Hi,

We have large no of  tif images from which we need to access the properties like size,image resolution, compression etc.
We are able to retrieve file modified date, file size etc but not the above information.
Please suggest an option.

Thanks!
Cph
0
NEW Veeam Agent for Microsoft Windows
LVL 1
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

I am trying to get the following DOS command to produce Unicode file names in its output:

CHCP 850 - Multilingual (Latin I)
DIR C:\*.* /b/s > c:\temp\filex.txt

filex.txt does not contain Unicode
0
Date Stamp Issue - I want to copy files from my GoPro to Seagate External - Don't Want Todays Date Want Creation Date.

In the past I've always been able to copy files and the date stamp would be retained to when I created it.  Now all of a sudden every file copied has todays date.  I don't get it.  Why would i want today's date of my videos or photos.

Any help would be great.

I have Windows 10 and I don't want to install additional software, just want to use Windows commands.

Thank you.
0
Hi,

I have a textfile (tab separated), I want duplicate KeyNR to be joined according to the last field.

So I have:

FirstNM        LastNM        KeyNR        Group        Location
John              Doe1            6576            Testgrp      1
John              Doe2            6543            Testgrp      3
John              Doe4            3243            Testgrp      3
John              Doe1            6576            Testgrp      3,4
John              Doe2            6543            Testgrp      2

I want this to result in:

FirstNM        LastNM        KeyNR        Group        Location
John              Doe4            3243            Testgrp      3
John              Doe1            6576            Testgrp      3,4,1
John              Doe2            6543            Testgrp      2,3

As you can see the second and the fifth line and the first and the fourth have the same key, the location needs to be merged with a comma in between.
0
i have a subfolder in the users directory. as youcan see, the batch file deletes it. the folder name is OSERV. how can i keep the script but keep OSERV untouched. i cannot move this folder from the USERS directory



Del "E:\Scanning\Users\*.*" /F /Q /S



thanks
0
I got this script now running

@echo off

set /p host=host Address:
set logfile=Log_%host%.log

echo Target Host = %host% >%logfile%
for /f "tokens=*" %%A in ('ping %host% -n 1 ') do (echo %%A>>%logfile% && GOTO Ping)
:Ping
for /f "tokens=* skip=2" %%A in ('ping %host% -n 1 ') do (
    echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A>>%logfile%
    echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A
    timeout 1 >NUL
    GOTO Ping)

But i want it so that all the Pings that are <1ms are not recorded.
Is this possible?
0
HI,
I have main Dir  , It contains many sub folders. Need a method to first find the file names which have a space in the beginning of the file and  than remove the space. It should not effect the original file name which contains space in between. (DOS CMD)

folder: task
sub folder : A
SUB FOLDER :TASK/A/MULTIPLE FOLDERS/ (SPACE)HOLL AND.TIF - ORIGINAL
SUB FOLDER :TASK/A/MULTIPLE FOLDERS/ (NO SPACE)HOLL AND.TIF - RESULT

Thanks!
Cheiro
0

Microsoft DOS

13K

Solutions

12K

Contributors

Microsoft Disk Operating System (MS-DOS) was an operating system for x86-based personal computers, and traces of it are still found in the Windows operating system. DOS is still used in some embedded systems and for certain legacy 16-bit networks.

Top Experts In
Microsoft DOS
<
Monthly
>