[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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

What is the WMIC command to get the Server/machine SID, not the domain SID?

I keep reading how to get useracoount SID or using Powershell.

What I require is using WMIC command only.
0
Exploring SharePoint 2016
LVL 12
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

What does the double percentages before the numbers mean? "%%3%%8%%9.CRL"

CERTUTIL -SETREG CA\CRLPUBLICATIONURLS "1:%WINDIR%\SYSTEM32\CERTSRV\CERTENROLL\%%3%%8%%9.CRL\N2:http://pki.ECHOs.com/certenroll/%%3%%8%%9.crl\n10:ldap:///CN=%%7%%8,CN=%%2,CN=CDP,CN=PublicKEY SERVICES,CN=SERVICES,%%6%%10"
0
is there a way to add to the windows credential manager via the command prompt
I'm not referring to cmdkey but the actual windows credential manager apparently they are not the same thing.
When I use cmdkey /generic:TERMSRV/server /user:username /pass:password
it works fine it I run mstsc /v:server  
but if I run it from the desktop by clicking on a shortcut it prompts me for the password; however, if I put the credentials in windows credential manager I do not get the prompt

so, is there a a command to add a username and password to windows credential manager ?
I don't want any user interaction I want to run it through a bat script or psexec or something.
Thanks!
0
Hi Experts,
I'm looking for either code or script that will do the following
loop thru all files of specific folder, not including sub folders (folder should only contain CSV files).
delete all the contents of those files, but do not delete the file itself.
Thanks
0
I have a few thousand files and the processed equivalent files in a folder  ( Windows Server 2016 machine).  But there are a  few files which missed the processing
An example list will be
Doc1
Doc1.Timestamp.lck
Doc2
Doc2.Timestamp.lck
Doc3
Doc4
Doc4.timestamp.lck

IN the sample, Doc3 is not processed. How can I get the list of   files not processed  when the list is huge?
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
Windows Batch file to count a set "N" number of files from a single source folder,merged multiple files together into a single output file that contains <= N number of records, and move processed files to a save directory folder.

Request for a window bat file that can be run from command/CMD prompt.  Windows 7 environment.

Windows Batch file to copy a set "N" number of files from a single source folder to an output file, move processed records to a single save folder.  The single source directory may contain 1 up to a million files.  
Need to copy 200 files at a time to a newfile_N+ that should contain <= 200 files per newfile_N+ until all records have been read and processed.

Input file extension: *.hl7
Output file newfile_N+ extension: *.txt

Source directory - C:\temp\source
Destination directory - C:\temp\output\newfile_N+.txt
Destination directory - C:\temp\processed

For the purpose of demonstration I have attached (5) sample hl7 files.
Each newfile_N+.txt file should contain <= 2 records per file.

Prior to kicking off the batch file.  All (5) source files would be all be in the (C:\temp\source) directory.
Upon completion of the batch program running.  The expected output once the bat file has run would result in the following:

C:\temp\source
      dir: contains no files *.hl7 files
      
C:\temp\output
 dir: newfile.txt, newfile1.txt, newfile2.txt
      Note: Each of these files contains <=2 records each, max is 2 records per file
      ==> newfile.txt …
1
Anyone have a good solution to rename recursively all the files in a directory tree that begin in _ or contain ()!$% etc?  I am trying to start a massive FTP upload but it fails due to the names.  I have already used CMD to recursively remove temp files and such but the ren command doesn't work recursively.
0
Request for a window batch file that can be run from command/CMD prompt.  Windows 7 environment.

Windows Batch file to move a set "N" number of files from a single source folder to a destination folder.  The single source directory may contain 1 up to a million files.  Need to copy 200 files at a time to a destination folder_N+ that should contain <= 200 files per destination directory.

Once all the files are moved to the destination folders, would like to merge the multiple files per individual destination folder into one single file. (copy *.hl7 newfile.hl7)

File extension: *.hl7
Source directory - C:\temp\source
Destination directory - C:\temp\outputN+

For the purpose of demonstration I have attached (5) sample hl7 files.  
These (5) files would be all be in the (C:\temp\source) directory.  
Expected output would result in the following:

C:\temp\output
 dir: new 1.hl7, new 2.hl7
 copy *.hl7 newfile.hl7

C:\temp\output1
 dir: new 3.hl7, new 4.hl7
 copy *.hl7 newfile.hl7

C:\temp\output2
 dir: new 5.hl7
 copy *.hl7 newfile.hl7

Note: The folder names may contain spaces, also the file names may contain spaces.
source.zip
0
Hi Experts,

I have the following command running as a batch file (on task scheduler) in an hourly bases.
xcopy "C:\Users\bfuchs\Dropbox\Caspio\caspiotables.zip" f:\Conversion\Caspio\ /y

Open in new window


would like to have this running in another pc as well as a backup.

However would prefer to have the following modifications

1- To first check for date/time that file f:\Conversion\Caspio\caspiotables.zip when it was modified, if it was not within the hour then perform the task.
2- Get an email informing it was done (so i know the 1st one failed).

Thanks in advance.
0
Rowby Goren Makes an Impact on Screen and Online
LVL 12
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

Hi

I am in search for dos command which I need to include in the batch file. The code I am looking for is to copy excel files from a Upload folder and paste it in the archive sub folder(which sits in Upload folder). Each time I run batch file, it should copy files from Upload folder and paste in archive folder. If the files with same name exist inside archive folder, the dos command should over write only those files with latest files, leaving other files as they are.

Hope you get my point.

Any questions please let me know.

Thank you
0
Hi,

I am searching for a dos command which can cut files from a given folder and paste those files in to an Archive folder which sits along side with the files need to be uploaded into. There are folders with space in its name. I have to insert this command in a bat file. I use below code for my other tasks and its working fine, but it does not do cut and paste, it does copy and paste.

@echo off
setlocal

echo Start Copy

set SOURCE_DIR=C:\Nat\Reports\Reports
set DEST_DIRS="X:\", "N:\Reports\Production Repts\Reports"
set FILENAMES_TO_COPY="2018All Projects_New.xlsx","2017Report_New.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

Thank you
A
0
BATCH FILE:  The following command overlooks and does not copy files in directory  D:\Thunderbird

xcopy "D:\*.*" Y:\JKB\Backup\D\ /d /s /r /y /f

Open in new window


Other files in other directories are copied.

Any ideas???
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
Hi Experts,
How to grep connected tcp IP & Port connection then forcefully kill using batch.

example;-
netstat -a output is

Active Connections

  Proto    Local Address                        Foreign Address                State
  TCP       192.168.1.101:49366            192.168.1.55:65000          ESTABLISHED
  TCP       192.168.1.101:49475            192.168.1.55:64000          ESTABLISHED
  TCP       192.168.1.101:49384            192.168.1.55:63500          ESTABLISHED
  TCP       192.168.1.101:49396            192.168.1.55:22                 ESTABLISHED

Need to forcefully kill all TCP connection which is connected with 192.168.1.55
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
Hi Experts,

I have this question after resolving the following

https://www.experts-exchange.com/questions/29109077/How-to-concatenate-all-files-from-one-folder-into-one-ignoring-headers.html#a42623555

How can I modify the command to

1- Ignore all headers
2- include only files created in specific date range
3- include only files with specific names, like "*PatSched* and "*PatChanges*"

Thanks in advance.
0
Hello,

This is a follow-up to another thread located here:

Create an executable file to open a non-executable file

In that thread, expert Joe Winograd provided a solution which involves creating an AutoHotkey (ahk) "Run" command (which I know how to do) then compiling the resulting .ahk file to create an .exe file. That was a great solution and I'm glad to now know how to do that. However, since closing the previous thread, I've realized that that solution is not practical for the specific purpose* that prompted my question.

As a result, I'm back to my original question which is:

How do you directly create an executable file (.exe or .cmd) to open a non-executable file (.xlsm, .txt, .ahk, etc)?

In the previous thread, expert tuvi suggested putting the following in a .cmd file:

start C:\Users\UserName\FolderName\FileName.xlsm

Open in new window

Unfortunately, while I know how to place a command in the cmd/prompt/DOS window (not sure what it's called), I do not know how to create a .cmd or .exe file. I tried simply pasting the above line in a Notepad window then saving it, first with a .cmd extension and then with an .exe extension but neither of those worked.

It seems like something I should know how to do but that's why I'm happy all of you great experts are available to answer questions. :)

Thanks…
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
HTML5 and CSS3 Fundamentals
LVL 12
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Have a user that started saving long file names and folders creating problems on a 2012 Server. File path has exceeded 280+ in length luckily there are only 5 folders affected. Problem is I created a virtual directory to the folder using Subst command, however I get this error when I try to rename it.
subst error
I tried Subst in administrator mode but the drive doesn't show, a known issue.
I tried without administrator mode and the mapped drive shows however I get the above error.
Downloaded the gui interface get the same error above.
0
I have one folder "destination" where I have files and their time stamps (created, modified) I would like to preserve when I overwrite a few of those files with updated version of those files.

example

Destination Folder 
File.mp4- Created 01/01/01 (size 500mb)

Source Folder 
File.nmp4 - Created 12/12/12 (size 4.00gb)

Open in new window

I overwrite the file in the Destination folder with the new updated version from the Source Folder but keeping the original file in the destination folder timestamps

End Result (new overwrite file in the destination folder with original file timestamps)

Destination Folder
File.mp4 - Created 01/01/01 (size 4.00gb)

Open in new window


I have written a batch file to move the file as so

 
robocopy "Source" "Destination" /E

Open in new window


and this handles my overwrites and moving of my files perfectly, but I haven't found a way to preserves timestamps. I am looking for command-line so I can implement it in a batch file. Any help will be appreciated. I been reading flags for robocopy etc but maybe I'm reading it wrong or something but I haven't figured it out yet.
1
Hello,

How do you create an executable file to open a non-executable file?

I just began using a Corsair K95 RGB keyboard (which includes 18 programmable G-keys) along with its software (CorsairUtilityEngineSetup_2.24.50_release). While assigning macros to the G-keys, I discovered that while the software does allow you to run an executable file (*.exe *.bat *.cmd), there is no option to open a simple non-executable file (eg .txt, .xls, .ahk, .png, etc).

That seemed a bit odd to me but it was confirmed by Corsair tech support so during the conversation I asked about possible workarounds and the response was that I could create an .exe or .cmd file to open the desired non-executable file.

So for example, suppose you want to open the following Excel file:

    C:\Users\UserName\FolderName\FileName.xlsm

How would you create an .exe or .cmd file to do that?

Thanks
0
Hi Experts,
I have the following batch file
@echo off
setlocal

set  tm=%time: =0%
set  tm=%tm::=%
set dt=%date:~10,4%%date:~4,2%%date:~7,2%

copy  C:\Users\bfuchs\Dropbox\Caspio\CaspioTables.zip  h:\CaspioTablesDaily\CaspioTables%dt%%tm:~0,4%.zip

copy  F:\Data\SkilledNursingVisitNotestbl.mdb  h:\AccessTablesDaily\Skilled_Nursing_Tables%dt%%tm:~0,4%.mdb

Open in new window


Would like to have for the second file (the access file), to zip it into the destination, instead of just copying.

How can I accomplish that?

fyi- I have windows 7.

Thanks in advance.
0
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
Hi Experts,

We have windows server 2008 along with multipal users they have only remote desktop rights & i dont want assign administrator rights,

but a there is a software which need administrator rights (run as administrator) permission to execute from users, we had manage till startup time manually to run as a administrator with password but now there is more than 50 users that's why i can't manage manually.

I need a batch file which have store administrator password, I'll paste that batch to every user Desktop & locate the software path to in batch file run as administrator.



Path Example :-
for user1
D:/user1/Gm_4.1.1.1_05082018_PAN/EnhanceT.ext

for user2
D:/user2/Gm_4.1.1.1_05082018_PAN/EnhanceT.ext

for user3
D:/user3/NEW_4.1.1.1_12082018_PAN_A/EnhanceT.ext

for user4
D:/user3/Gm_4.1.1.1_05082018_PAN/EnhanceT.ext

for user5
D:/user5/Gm_4.1.1.1_05082018_PAN_5/EnhanceT.ext

for user6
D:/user5/Gm_4.1.1.1_05082018_PAN_6/EnhanceT.ext
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
>