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

A lot of folders can be robocopy to another server recently. The following errors are logged. Any idea ?

Thx

2018/05/02 03:12:36 ERROR 64 (0x00000040) Scanning Source Directory Z:\Tsegxxxxx\
The specified network name is no longer available.


2018/05/02 03:12:36 ERROR 64 (0x00000040) Accessing Destination Directory D:\ARCH17\Tsegxxxx\
The specified network name is no longer available.
0
Cloud Class® Course: CompTIA Cloud+
LVL 12
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

I want to rename all of Mp4 files to 1 2 3 4 5 6 7 ... so on

but the numbers sequence should be based on the created date-time   so all of my files are created today but their timing for creating them are different.

so 1 should be the name of the latest time of creation of the Mp4 and then 2 should be the name of second latest created

how can i do this automatically?
0
Hi guys,

I would like to rename multiple files by replacing the name by their first 19 characters of their old name.
Can you please assist.

Orginal file naming:
0000000000000376279.xml.3be03b33b7fd403bb03fe27fd1167ffc.error
0000000000000376280.xml.7c157a6cecf644cf934e919292339904.error
0000000000000376281.xml.80d7062d6cbc4c689d7c82c1e6ec35c7.error
. . .
. . .

I want to achieve:
0000000000000376279.xml
0000000000000376280.xml
0000000000000376281.xml
. . .

script used in CMD doesn't work
exception: command is incorrect

ren -n 's/(.{19}).*(\.error)$' *.xml

Open in new window


Thank you
Darius
0
I need to create a batch file that backs up a file then deletes the original file so that I can download a file with the same name.

As follows:

del myfileBackup.csv
copy myfile.csv myfileBackup.csv
del myfile.csv
...
myapplication --username --password --formID  --output myfile.csv

The problem I am running into is when a file is deleted/renamed it ties up that file and prevents the next step.

I get an error message

The process cannot access the file because it is being used by another process.

This caused my import/download to fail.

I appreciate any help that can be provided.

Thanks!

Michael
0
Hello All,

I come to you because I need your help!

Currently I have a Batch and Script, which allows me to change the wallpaper automatically and randomly to all users of the domain, both work changing the images, however I have noticed that sometimes repeats a wallpaper without finishing the cliclo of xx images published in a folder.

Greetings and thanks from the atheist for your valuable help!

Richard
0
I would like to use a batch file to send an email via a SMTP mail server with attachments.

I have all the settings because I use the SMTP within my SQL server.  The purpose of this  batch file is to take a 'txt' file and forward it to a recipient.  One other wrinkle is that it has to be conditional based on the value within a file, Y or N.

Is this possible?

Thanks

Glen
0
I am trying to delete a text file from all of the user profiles within the c:\Users and F:\Users on a Windows 2008 r2 server, using Del /q /f /s c:\users\%user profile%\folder1\folder2\*.txt. which does not work, and the error says path not found.   I need to delete the text file from all the users folders on the server.

how can I make it work.
0
I am having trouble with a variable in a batch file. I am setting a variable with special characters, and having trouble getting them to print.

One of the two special characters is %. That one, I got to print by putting two of them in the variable. (aka % became %%) The other character is ^. I have seen that ^^ should work. But, it does not.

The (literal) string that should print is:
P%@AP[4\PZX54(P^)7

Batch file I am using:
@ECHO OFF
SET location=P%%@AP[4\PZX54(P^^)7
ECHO %location%

My output is:
P%@AP[4\PZX54(P)7

<Missing the ^>

Might I need to escape the ()'s somehow?
0
Windows batch scripting & Del files in multiple directories

I want to delete *.dmp & text files from within the user profiles.      “What command or commands in a script can do this ? “  Because they will be put into the Windows task scheduler for automation.

Location of the files are in the AS400 folder. This is the full path.
H:\USERS\userProfiles\IBM dump\AS400\*.dmp and *.txt.

Note: The environment is Windows 2008 r2, in an Active Directory environment.  userProfiles  contains all of the “different user folders”  who are on the network.

The problem I have been having is bad info claiming to work that is tested and Does not work.
0
DOS FTP access script

I am using this command:
ftp -s:ftp.txt
ftp.txt is this:
open 000.000.000.000
MyUser
MyPassword
lcd c:\_A
put TR.bak
quit

I get this response:
ftp> Connected to 000.000.000.000.
open 000.000.000.000
220 Microsoft FTP Service
User (000.000.000.000:(none)):
331 Password required for MyUser.

530 User MyUser cannot log in.
ftp> Local directory now C:\_A.
ftp> lcd c:\_A
put TR.bak
530 Please login with USER and PASS.
530 Please login with USER and PASS.
ftp> quit
221  

the password is correct. What am I doing wrong here?
0
Keep up with what's happening at Experts Exchange!
LVL 12
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

I do much work with my legacy software in DOS windows of Windows 7 32-bit, sometimes with 3 DOS windows open at one time.
 It's time for another computer, but most PCs are sold with 64-bit Windows 10 installed.  My research so far suggest that using DOS on a 64-bit system with things like VDOS or DosBox is very cludgy.  Would appreciate learning any better way to recreate my DOS-friendly environment in a 64-bit OS.  If not I will have dealer install 32-bit Windows 10.
0
I can't figure out how to make a lives system for my game and I need to know how.

Here is my code for the lives;

SET lives=5

:Scene1
CLS
ECHO  o       Woof!
ECHO /0\   ,###@'
ECHO / \     /   \
ECHO #########################################
ECHO.
ECHO You are walking along the dirt
ECHO road with your backpack and trusty dog Steve.
ECHO You have !lives! lives.
PAUSE
CLS

. . .

:WinFight1

SET /a lives-=1
CLS

ECHO  o
ECHO /0\    ,###@                      w   \__,.  \__,.
ECHO / \      /   \                        3--`~  /--,^  /--,^
ECHO #########################################
ECHO.
ECHO You won the fight!
ECHO You now have !lives! lives.
PAUSE
GOTO Scene2

Open in new window



I expected it to output 'You have 5 lives.' in the first section, and 'You now have 4 lives.' in the second part, but instead, I got 'You have !lives! lives and 'You now have !live! lives.'
0
I want to get a listing of all files under a directory  along with the full path ( or relative path)
I want the list of all files including the subdirectories  ( This is Windows server 2012)
There are about 3 million files altogether
 I want the whole list ( File names with extension  and paths )  in an excel sheet or MS Access DB

Can you please help?
1
Hello,
I would like to use a script to query the processes on the server, based on the process id and returns the user name. I tried following four methods and they all only work with administrator permission.  Without admin permission, they will not return the user name. May I ask if any method to return the user name, without server admin permission? Thanks so much in advance!

get-process -id 12856 | select-object id,name,@{n='Owner';e={$owner}}

Get-Process -Id 12856 -IncludeUserName | Select-Object -Property UserName

tasklist.exe /v /fi "PID eq 12856"

QUERY PROCESS 12856
1
I have a batch script that I am attempting to use from a WinPE boot disk to capture and restore hard drives.

Here is the snippet of code I have that is failing.

echo Please locate image name from list below
echo ==========================================
echo Here are the images we found on your drive
echo ==========================================
echo ==========================================
@echo off
for %%p in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%p:\images set w=%%p:\
dir /b /w %w%images
echo ==========================================
echo ==========================================
echo Press enter when you are ready
pause


:imageName
@ECHO OFF
SET /P imageName=Please system image name for deployment: 
IF "%imageName%"=="" GOTO imageNameError else goto deploy

:deploy
@echo off
for %%p in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%p:\images set w=%%p:\
DISM /apply-ffu /ImageFile=%w%images\%imageName%.ffu /ApplyDrive:\\.\PhysicalDrive0

Open in new window


If I however go to the path containing the ffu image and run this snippet of code, manually, it works.

Anyone else using DISM and encountered this?

DISM /apply-ffu /ImageFile=d:\images\windows.ffu /ApplyDrive:\\.\PhysicalDrive0

Open in new window

0
Is there a way to run this automatically?  We have users who get "There are currently no power options available" and I was able to get power options by running it 2 machines so I think it'll work on many more here.

start, run  cmd with administrative rights

secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose

and upon restart, they'll have power options.
0
We need to create a series of files with over 1gb size for a project we  have.  We use fsutil and it works; the problem is that it affect the "free space" when querying the disk size.  Is there a waye to do this?
0
I recently updated a sync computer batch file from xcopy to robocopy.  This resolved some problems but I discovered that robocopy does not copy open files as xcopy did. Does anybody know of a copy routine that can run from a batch file that copies open files. The biggest problem is MS Word keeps files open in the background even after it is closed. It would be great if it has a copy version option (copy newer files to a new version number instead of overwriting the older file) and multi-thread capability. Free or low cost would also be good.

TIA
0
Hi Experts,
pls help me out on this. bit tricky one :)

1. Have a file similar to ".ini" format header and its sections. e.g. schema.ddl
2. Another file with list of keywords on each line. e.g table_list.txt
3. Need to read each line from table_list.txt and search it in schema.ddl and remove the entire table section and its associated index section as well.

Have attached both the files for your quick reference. pls unzip schema.zip file.

E.g
"S_PARTY" is the first keyword from the table_list.txt
table section can be found in schema.ddl between line # 317941 and 317960
associated section can be found between 317962 and 318029

basically for each keyword (table name) we need to repeat the process and remove relative entries using windows batch or powershell or vbscript reason,  this will be executed on a windows machine. if any util that doesnt require installation and would easy this. we can use that util as well.

pls help and thx in advance.
schema_txt.zip
table_list.txt
0
Free Tool: SSL Checker
LVL 12
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I currently have three folders on my "H" drive
  ** H:\a\.........
  ** H:\b\.........
  ** H:\c\.........

I then do robocopy G:\ H:\ /s /e /copyall /mir /v /tee /r:0 /log:robocopyNOTES.txt and all of the above folders get deleted, even when I do NOT have these folders on the G drive

How can I copy the G drive folders to the H drive, keeping existing H drive folders as-is if they do not have the same name as G drive folders ?
0
Hi Experts,
I would like to have a script/function that opens the following site
https://pages.caspio.com/login/bridgelogin/default.aspx?_ga=2.157757818.1116850724.1518037460-1462101065.1512014265
fills in the account, username and password.
See attached.
Should either be done thru Access VBA or via script.
Thanks in advance.
Untitled.png
0
Hello Experts,
We have windows 7-64 bit systems in my office network with administrator user login, i need a batch file to install IP in systems (physically access) from a iplist.txt after install IP it should block IP change permission & protect with password.
0
i have an old HP 6360 computer and an HP 5 printer that i use for printing financial statements and envelopes. i am still using lotus's symphony in dos for the f/s and office 97 for the envelopes. my os win 98 became corrupted and i had to start over with another hard drive. i was able to install the old drive as a slave and obtain the files and software copied to the new hard drive. the system is up and running and i can print envelopes in windows w/ the office 97 from the templates that i retrieved. symphony files and f/s runs fine and i can retrieve all files but i can't print the files on  the HP 5 printer. the "printer driver not loaded" error. i have the original 3 1/2 diskettes that came with the printer and have attempted to load the drivers numerous times and followed the directions as best i can and have 2 large manuals for symphony that i have had since 1984. this is a complicated program for an accountant but not a programmer i guess. i don't how the drivers are loaded to the program in dos and how it works. the printer drivers are supposed to go to a file called "lotus" . i don't know whether the program has to be on the root directory along with the "lotus" file and loaded when dos boots etc. i don't understand how it works and at my memory is not 100% from something that was done that long ago. this machine is a stand alone as is not hooked to the internet. basic office tasks only but it still has a function. thanks.
0
I have the following batch file.

@echo off

set hour=%time:~0,2%
if "%hour:~0,1%" == " " set hour=0%hour:~1,1%
echo hour=%hour%
set min=%time:~3,2%
if "%min:~0,1%" == " " set min=0%min:~1,1%
echo min=%min%
set secs=%time:~6,2%
if "%secs:~0,1%" == " " set secs=0%secs:~1,1%
echo secs=%secs%

set year=%date:~-4%
echo year=%year%
set month=%date:~4,-8%
if "%month:~0,1%" == " " set month=0%month:~1,1%
echo month=%month%
set day=%date:~7,-5%
if "%day:~0,1%" == " " set day=0%day:~1,1%
echo day=%day%

set datef=%hour%-%day%-%month%-%year%
set dayf=%day%-%month%-%year%

echo datetimef=%datef%
echo %dayf%

pause

set findtext=" DS-"
set findfile="Z:\OP\exa\02-04-18 - Copy.P02"

findstr %findtext% %findfile%

for /f "delims=" %%a in ('findstr %findtext% %findfile%') do echo %%a >> "Z:\OP\test-%month%-%year%.txt

pause

Open in new window

I however need to search for multiple criteria i need to find all instances of " DS-" and " DSA-" how do i search for both?
0
Hello, Everyone, I found two very similar one-liners as part of the solution to WMI issues in SCCM client installation:

1.) from https://www.virtuallyboring.com/microsoft-wmi-invalid-class-error-0x80041010/
dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt & for /F %s in (moflist.txt) do mofcomp %s

2.) from https://blogs.technet.microsoft.com/yongrhee/2016/06/23/wmi-stop-hurting-yourself-by-using-for-f-s-in-dir-s-b-mof-mfl-do-mofcomp-s/
dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt & for /F %%s in (moflist.txt) do mofcomp %%s

What's the difference between the two? I used the line from link #2 (%%s), but I got the error "%%s was unexpected at this time."   I understand from other posts that using "%%s" in batch files will not yield errors.  When I used the line from link #1 (%s), the command ran.

If both lines get executed successfully, whether via CMD or BAT files, would they have the same end result?

Thank you very much.
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
>