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

Hi

I am finding a script to update email signature when a user login our network.

The mechanism is simply copy a pre-created signature in server to their signature folder (%userprofile%\AppData\Roaming\Microsoft\Signatures\)

For example
Copy server\%username%\*.*     %userprofile%\AppData\Roaming\Microsoft\Signatures\  
Copy server\%username%\user1_files     %userprofile%\AppData\Roaming\Microsoft\Signatures\

This is to copy all files by *.* and the folder name "user1_files"

But I cannot find the VBScript. For DOS, it can only copy files. I don’t want to create a folder method because I may use Excel to generate the script if using DOS.

Anyone can help?
0
CompTIA Security+
LVL 13
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

I have created batch job to copy a file to UNC path, which is mapped to my computer. The batch job run from task scheduler but the file doesn't transfer to UNC path. But if I run command manually is successfully copy files. I have tried both batch below:
####################################
  @echo off
pushd c:\xxx\zzzz\yyyyyy\
COPY * Q:\test\--(note:this is the map drive letter for unc path)
Sleep 5
popd
end
cls
################################################
@echo off
cd c:\xxx\zzzz\yyyyyy\
move * Q:\test\--(note:this is the map drive letter for unc path)
sleep 5
del *
#end
exit



Action Started
Task Scheduler launched action "C:\Windows\SYSTEM32\cmd.exe" in

instance "{90e9b280-15df-4a79-9ec1-6bef9a621423}" of task

"\xxxxxx".

Action completed
Task Scheduler successfully completed task "\xxxxxx" , instance

"{90e9b280-15df-4a79-9ec1-6bef9a621423}" , action "C:\Windows

\SYSTEM32\cmd.exe" with return code 0.
0
I have few OS commands which I need to run only through ADMINISTRATOR's CMD console
please advice how to call such batch script

example :TEST.BAT
how to make sure below  script called from admin cmd console
==

echo " Hello"

==
0
I run the following script .cmd file



@echo off
setlocal enabledelayedexpansion

set startTime=%Date% %time%
echo Start Time: %startTime%

Robocopy /s \\Image1\Images\ICSStorage\20080211\C43F9AAF-B3F1-46EC-A2BE-E3B8BED78B7E.tif      \\testsql3\NGProductionDocs\NGSourceDocs\ICSStorage\20080211\C43F9AAF-B3F1-46EC-A2BE-E3B8BED78B7E.tif      /dcopy:t /mir /FFT /Z /np /tee /log+:D:\NGProductionDocs\Config\Log\CopyOverLog\CopyOver_ICSStorage.log
      

echo Finish Time: %Date% %time%
pause

I have the following error

'\\testsql3\Config\Maintenance\NGPRDToTestSQL3'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
Start Time: Sun 01/13/2019  0:07:31.87

 Log File : D:\NGProductionDocs\Config\Log\CopyOverLog\CopyOver_ICSStorage.log

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows

-------------------------------------------------------------------------------

  Started : Sun Jan 13 00:07:31 2019

   Source : \\Image1\Images\ICSStorage\20080211\C43F9AAF-B3F1-46EC-A2BE-E3B8BED7
8B7E.tif\
     Dest : \\testsql3\NGProductionDocs\NGSourceDocs\ICSStorage\20080211\C43F9AA
F-B3F1-46EC-A2BE-E3B8BED78B7E.tif\

    Files : *.*

  Options : *.* /FFT /TEE /S /E /COPY:DAT /DCOPY:T /PURGE /MIR /Z /NP /R:1000000
 /W:30

------------------------------------------------------------------------------

0
What is the command line, within a batch, if possible, to start that batch in Administrator mode?
Or would another batch be needed to trigger this batch in Administrator?
0
Hi

I am using below dos command to upload excel reports on to SharePoint. It is working fine. Only issue is, if someone opens the current file from SharePoint, below code is unable to upload updated file onto SharePoint, because the same file has been checked out to someone.  How can I solve this issue? I want a dos command which can  kill the same file (which are there on the code) from SharePoint before upload the fresh one.

@echo off
setlocal

echo Start Copy

set SOURCE_DIR=C:\abcd\efg\hij
set DEST_DIRS="Y:\"
set FILENAMES_TO_COPY="abcd.xlsx","xyz.xlsx"

pushd "%SOURCE_DIR%"

for %%F in (%FILENAMES_TO_COPY%) do (

    for %%D in (%DEST_DIRS%) do (
        echo file "%%~F" to "%%~D"
        xcopy /Y "%%~F" "%%~D"
    )

)

popd

echo. Done.
exit /b

Really appreciate help on this

Thank you
0
Hi,

I am looking for a script which loads files to SharePoint daily basis. I use windows 10 and 7 laptops. I have created mapped drive to SharePoint on my computers. I was using batch file to migrate data quite successfully. But now I have to migrate data into different folder and links in SharePoint. My batch file(dos commands) is not capable to do that.
0
Hello Experts,

I need a help I've a batch script for folder locking, in this script I've set a password for folder access after that I convert this batch to exe & give it to users.
Now user wants to create own password & after creating the password once user put password for folder access it should not be appear it should be in form in dot or blank.
Most important thing i want set a default password in case users forget password in that case admin should open that folder from default password, also main folder, sub folder & files which is store in Vault folder should not be find if anyone try to find using windows search.

Script:-

cls
@echo off
mode 50, 10
title   ~Safty Vault~

echo.
(SET OUT=3F)

color %OUT%

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Vault goto MDLOCKER
:CONFIRM
echo Are you sure you want to lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Vault "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p "pass=>"
if NOT %pass%== password goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Vault
echo Folder Unlocked successfully
0
Chemo has taken a lot from me. I am having problem with a batch file and have gone back to square 1 to test simple things.

@ECHO OFF
IF EXIST %1 GOTO ITEXIST
ECHO %%1 DID NOT EXIST
GOTO EXIT
:ITEXIST
ECHO %%1 DID EXIST
:EXIT
ECHO ON

Why am I getting a syntax error?
1
Hello Experts,

I am trying to run as administrator a .bat file on a Windows 10 virtual machine remotely via VirtualBox's command line interface. I am controlling the Windows 10 virtual machine via a Linux headless server.

Currently I am using the command:

vboxmanage guestcontrol "win10clean" exec --image "C:/Temp/run.bat" --username localadmin --password *** --verbose --wait-stdout

Output:

Opening guest session as user 'localadmin' ...
Waiting for guest session to start ...
Guest session (ID 13) has been started
Starting guest process ...
Process 'C:/Temp/run.bat' (PID 4592) started

C:\WINDOWS\system32>REG ADD HKLM\Software\Microsoft\Windows\currentversion\explorer\advanced /v Start_PowerButtonAction /t REG_DWORD /d 2 Process terminated
Exit code=1 (Status=500 [successfully terminated])
Closing guest session ...

The VM name is win10clean
The .bat file is called run.bat and is stored on the VM under the path C:/Temp/
The run.bat file is suppose to update a registry value which is why the command must be run as administrator. However the registry value says the same.
1
Exploring SQL Server 2016: Fundamentals
LVL 13
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

Hi,

Please let me know how to add SharePoint login credentials in below code.

@echo off
setlocal

echo Start Copy

set SOURCE_DIR=C:\Users\xxxx1\Desktop\kk1
set DEST_DIRS=C:\Users\xxxx1\AppData\Roaming\Microsoft\Windows\Network Shortcuts\SharePoint
set FILENAMES_TO_COPY="Report.xlsx", "Report Full.xlsx"

pushd "%SOURCE_DIR%"

for %%F in (%FILENAMES_TO_COPY%) do (

    for %%D in (%DEST_DIRS%) do (
        echo file "%%~F" to "%%~D"
        xcopy /Y "%%~F" "%%~D"
    )

)

popd

echo. Done.
exit /b

Really appreciate any suggestions on this.
K
0
Hi

I have some reports (MS excel Spreadsheets) on my folder on C drive. I have created a module in MS Access 2013 database. This module can be called using AutoExec macro. Basically I have created some scripts which will run a query and export the result into different excel files and then do the formatting. I need to transfer those excel files into SharePoint on daily basis. SharePoint is password protected. I am trying to automate the process. I use windows 7 OS, Office 2013. I am looking for a vba code/scrip or MS DOS/batch to do this work for me.

On SharePoint, there are some files already exist. I don't want to delete those files while I run script to transfer my reports into SharePoint.

Any support on this would be greatly appreciated.

Thanks
K
0
Hello Experts,

we have backup in e:\data\
e.g.
TERMSCLE31_07_2018_04_12.zip
SMECLE31_07_2018_04_18.zip
TERMSCLE01_08_2018_11_00.zip
SMECLE01_08_2018_11_05.zip
TERMSCLE02_08_2018_02_39.zip
SMECLE02_08_2018_02_45.zip
TERMSCLE03_08_2018_05_55.zip
SMECLE03_08_2018_05_56.zip

I want take backup on daily base from e:\data\<current date .zip> to two drives

e.g.
g:\ace\<create current date folder>\

k:\rule\<create current date folder>\

Please suggest this process how to done from batch script, after complete this task log (.txt or .csv) should be generated ?
0
Hi Folks,

is there a command or a way that will decipher what GPOs are being applied to a GroupMember ?
0
We have some upgraded going on some of our web severs.
Till that time we need check many urls manually daily.

I want to write a vb script to check urls if it is up or not and send us status report through mail.

urls address start with https:// and we need to use F5 Token and disable proxy setting to connect those server.

we don't have power shell access as well.

could somebody please help me to write a vbscript or bat script to automate these stuff.
0

One for the Experts...


31


Good day gentlemen (and any ladies that may also be present among us).

I have a cracking challenge that will tease your expertise.

I have titled this challenge '31' because it is based on a simple game I played as a child.

The game starts with a running total of 0. Two players take turns choosing a number between '1' and '6' which is added to the total. The player who chooses the number which brings the total to '31' wins.

The numbers '1' to '6' are chosen from a pool of four '1's, four '2's, four '3's, four '4's, four '5's and four '6's. Once a number is chosen, it is removed from the pool of available numbers.


Example:

Total = 0

Let's say we have the following numbers available:

1111
2222
3333
4444
5555
6666

Player A chooses say, 5.

Total = 5 (because 0 + 5 = 5)

A '5' is removed from the pool of available numbers so we now have:

1111
2222
3333
4444
555
6666

(Notice there are now only 3 '5's in the pool)

Let's say player B chooses '4'

Total = 9 (because 5 + 4 = 9)

And our number pool now looks like the following:

1111
2222
3333
444
555
6666

If any set of numbers '1' through '6' is exhausted then that number cannot be chosen in subsequent turns.


Programming Considerations

The program must be written using only DOS commands as a .BAT or .CMD
0
Need solution in UNIX for below scenario.

I have a folder like /desktop/user/folder with the below files in it. I want the count of the files after removing the timestamp from the files.
Need more of a generic solution which can handle any timestamp format and file format.

test_file1_20110101.txt
test_file1_20109102.txt
test_file2_20110102.dat
test_file2_20110103.dat
test_file2_20110104.dat

Expected Result:
test_file1    2
test_file2    3
0
Hi, I did some WMI troubleshooting on a Win10 Pro that was having trouble with the SCCM client installation.
After running the WMIDiag.vbs script from the WMI Diagnosis Utility 2.2 DL link (https://www.microsoft.com/en-us/download/details.aspx?id=7684), I ran this on an elevated command prompt:

dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt & for /F %s in (moflist.txt) do mofcomp %s

I didn't notice that I was currently in the C:\Windows\System32 directory instead of a level deeper, in wbem. My bad.
I got the following output:

===========================================================================
C:\Windows\System32>dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt & for /F %s in (moflist.txt) do mofcomp %s

C:\Windows\System32>mofcomp psmodulediscoveryprovider.mof
Microsoft (R) MOF Compiler Version 10.0.10240.16384
Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.
Parsing MOF file: psmodulediscoveryprovider.mof
MOF file has been successfully parsed
Storing data in the repository...
Done!

C:\Windows\System32>mofcomp RestartManager.mof
Microsoft (R) MOF Compiler Version 10.0.10240.16384
Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.
Parsing MOF file: RestartManager.mof
MOF file has been successfully parsed
Storing data in the repository...
WARNING: File RestartManager.mof does not contain #PRAGMA AUTORECOVER.
If the WMI repository is rebuilt in the future, the contents of this MOF file will not …
0
I have a macro express pro app that I want to keep running in the background when my computer is on. For some reason, it stops functioning and terminates. But I don't know that until I go to call it up and I have to restart it. Also, it supposed to run at startup, but maybe windows doesn't like it, so it does not start with the other apps at startup. How do I use the task scheduler to make sure it starts at startup and also to check that it is running and if it is not running to relaunch it. the default path to the app is "C:\Program Files (x86)\Macro Express Pro\MacExp.exe" default directory is "C:\Program Files (x86)\Macro Express Pro"
0
Introduction to Web Design
LVL 13
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

Hi Experts,

We are changing our servers to virtual servers, and for protection sake our IT doesn't want map drives to our data server, therefore for getting access I would need to type \\MyServerName and this would always prompt me for a user name and password.

How do I program these settings in Access?

Also we currently have some data residing in SQL. and currently have DSN files storing all connection info, and in Access linked table manager we just point to that DSN.

How will all these get accomplish w/o saving a DSN locally?
0
Hello,
 I try to use the winscp.com command line with the pageant.exe tool.
 The goal is to bypass any question related to my password.
 I know the pageant.exe; it works very weel with the putty.exe and plink.exe.
 What is the exact syntax for the command line ?

 I try the 2 command without success :

 winscp.exe /ini=nul sftp://root@hostname /privatekey=path\file.ppk /script=path2\command_script.cmd /log=path3\log_file.log

 winscp.exe /ini=nul /script=path2\command_script.cmd

 ...considering that the "command_script.cmd" include the path for the SSH Key (ppk), starting by a "open" Again, the script ask me to provide the user Root password. It seems that it doesn't recognize the PAGENT process

 Regards,
0
Most of my work involves video editing.
The folders (Dir) where I keep originals, copies, pre/post-edit files and so forth are all set with the following "sort" attributes (columns):
Name - Length - Size - Frame Width - Frame Height - Data Rate

For each new folder I create or Copy/Move I have to redo all these attributes again, specially when I copy a folder since it always seems to default back to:
Name- Date Modified - Type - Size or similar values.

You can imagine the amount of time & effort required to do this for all new or copied folders..
I've tried every conceivable syntax with Robocopy and cant get it to work for these reasons:
1. When I open CMD it defaults to the current User, which does have Admin rights, but I can't get Robocopy to work with the "COPYALL" or any other syntax other than "\e" and that only gives me a copied Dir/sub-Dir again with default values..
2. When I open CMD and "Run as Admin" it goes to C:\ .. which is fine, except the DIR Im trying to copy shows as "Cannot find path specified" ..

The main Dir Im trying to work with is located:
C:\Users\AV Masters\Video\Edits
I created 2 test folders (DIRS) under \AV Masters\ .. called AVTEST1 and AVTEST2
AVTEST1 contains a sub-Dir named "AV" which contains some sample videos to test this copy process..

What I'm trying to accomplish:
Create one main folder (Dir) with a sub-Dir that contains the video files I want..
Whenever I need to create a new folder/Dir somewhere or copy an …
0
No comments, but we're still running WordStar v.7 as our main word processor. We operate the 32-bit version of Windows 10, and we physically print letters from WordStar via a PCL driver (mapped to shared Windows printers). This works fine with all of our printers except one - our Canon iR4570 copier.

Our main copier has just gone to the wall, so we're down to only one LaserJet that can carry out this function. Obviously I want a bit more redudency than this.

We run Wordstar as a legacy app through the ntvdm.exe process we've installed with Windows 10 32-bit. If I send a print job via PCL to the iR4570 it generally never prints anything, and the touch-screen concole becomes unusable. It is like it is running a corrupt process that is consuming all memory and/or CPU cycles . The only way to recover is to physically switch the iR4570 off.

On very rare occasions, it does start printing, but just junk text comes out - either filing the page, or just a couple of letters at the top of each page. It'll print until the trays are empty.

If I print to the iR4570 via PostScript from Wordstar, it is absolutely fine. HOWEVER, PostScript fonts are slightly bolder, and it doesn't look quite right for our requirements.

The iR4570 has a pretty much identical firmware to our other copier that went to wall, and which handled this all fine with PCL printing, day in day out, until it's demise. I'm hopeful there is something just not right in the settings I can flush out - but before…
0
I need to set permissions on multiple computers so that the permission will not affect the folder or subfolders but the inheritance will still apply to the files within those folders.

ex:  c:\temp\scratch\sub\ needs to have permissions applied so that users can't delete either the "scratch" or "sub" folders but can add and delete files within them.  

According to Microsoft you need to use the "OI" and "IO" commands together but they don't give examples, any examples I've found online don't appear to work.   It should read something like "cacls c:\temp\scratch /G everyone:(IO)(OI)(C).  I've also tried the icacls version with no success, I've also tried only using the "C" (change) permission without the IO & OI but the folder can still be deleted.

Has anyone gotten this to work?
0
Please see PDF attached for plugin requirement. I'd like to deploy this to remote machines using PSEXEC. Can an Expert
please provide me the commands I need to execute? I'd like to also configure the command to produce a file (txt or whatever) that will give me the results of the deployment whether it deployed successfully or failed.  Can you please provide me the commands using my scenario below:

1. Executing PSEXEC from Server1
2. Plugin install (.exe) located in root of C:\ on Server1. Plugin file name "Workfront.exe"
3. I've created a .txt file in the root of Server1 name "computers.txt", which contains the remote hosts for my deployment.

This install needs to be silent. I believe it is necessary for the machine to reboot in order for the plugin to install. I tried a manual install, and a reboot was required. Maybe you Experts can tell by viewing the PDF requirement.
Workfront--Setting-up-the-WorkFront-.pdf
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
>