Windows 10: I am unable to get the time stamp in file name by using batch script in Windows Server...

Discus and support I am unable to get the time stamp in file name by using batch script in Windows Server... in Windows 10 Gaming to solve the problem; I am unable to get the time stamp in file name by using batch script in Windows Server 2022 Datacenter 64-bit Version 21H2Build 20348.1487 . Could you... Discussion in 'Windows 10 Gaming' started by Moulali.D, Jan 18, 2023.

  1. Moulali.D Win User

    I am unable to get the time stamp in file name by using batch script in Windows Server...


    I am unable to get the time stamp in file name by using batch script in Windows Server 2022 Datacenter 64-bit Version 21H2Build 20348.1487 . Could you please help me on this.

    :)
     
    Moulali.D, Jan 18, 2023
    #1
  2. Bentley12 Win User

    Batch File to list files from two seperat networks

    Hello,

    I work in a factory where multiple PCs are on seperate VLANs. I need to view contents of a directory from one VLAN called "Admin" and compare it with individual directories from multiple PCs on another VLAN called "Shop" ("Shop" is not part of the Domain)

    I have created a VB script that will compare two txt files and report the diffences. So I am trying to create two text files from each VLAN using a batch file. The batch file will be ran from a PC with two network cards so it can see both VLANs.

    I can easily create the list from the "Admin" network using:
    dir /b \\Server\Share\ > Active.txt

    The "Shop" list is different. It needs a username and password. All Shop PCs have the same user name and password but I'm not sure how to structure the script to create a list from multiple PCs using a user name and password.
    If I open the folders from Windows and enter the credentials then a script like this will work:
    dir /b \\PC_Name1\Share > Programs.txt
    dir /b \\PC_Name2\Share >> Programs.txt

    Using the command above without first opening the folder and entering the credentials gives this error: Logon failure: unknown user name or bad password

    Thanks in advance for any help.
     
    Bentley12, Jan 18, 2023
    #2
  3. Running PowerShell script as a batch file

    Hello Baldo,



    Thank you for writing to Microsoft Community Forums.



    I understand that you want to execute the PowerShell commands as a batch file.



    I tried executing the batch file on my machine but I was unable to execute it as the command was incomplete. However, after making some changes in the command I was able to execute the batch file.



    You can try the following command by saving it in a batch file and check if that helps.



    powershell –Command Get-AppxPackage Microsoft.3dBuilder | Remove-AppxPackage



    Also, as the query is related to running a PowerShell script using a batch file, I suggest you to post the issue on

    TechNet
    forums where we have professionals who have more knowledge about the issue.



    Hope it helps.



    Regards,

    Prakhar Khare

    Microsoft Community – Moderator
     
    Prakhar_Khare, Jan 18, 2023
    #3
  4. HAT
    hat Win User

    I am unable to get the time stamp in file name by using batch script in Windows Server...

    Batch file needs tweaking

    I've been using AviSynth for deinterlacing and tetelecining TV series lately, and in the process I have to write many scripts for each episode. I've found a batch file that pretty much automates this, but there is one issue. For example, if my source file is "Monk s01e01.mkv", the script the batch file gives me is named "Monk s01e01.mkv.avs". As the files AviSynth produces go by the name of the AVS script, if I processed the script with that name, the resulting file would be "Monk s01e01.mkv.avi". I need to get the .mkv part out of the .avs script the batch file produces. This is the batch file:

    Code: for %%n in (*.mkv*) do ( echo setmtmode(5,4^) > "%%n.avs" echo ffmpegsource2("%%n"^) >> "%%n.avs" echo setmtmode(2^) >> "%%n.avs" echo qtgmc(edithreads=2^) >> "%%n.avs" echo selecteven(^) >> "%%n.avs" )[/quote] So, any way to get the .mkv out of the files produced by this batch file? It really beats having to write a script for each episode individually.
     
Thema:

I am unable to get the time stamp in file name by using batch script in Windows Server...

Loading...
  1. I am unable to get the time stamp in file name by using batch script in Windows Server... - Similar Threads - unable stamp file

  2. Batch Script Adding a Period . to File Name

    in Windows 10 Gaming
    Batch Script Adding a Period . to File Name: Hi, I am testing a script to find the last file within a folder.It can locate the correct file, but the resulting variable includes a period . within the file name.Here's the script:REM Copy the recent Friday evening's Diff Backup onto the drive G: My Passport device.@echo...
  3. Batch Script Adding a Period . to File Name

    in Windows 10 Software and Apps
    Batch Script Adding a Period . to File Name: Hi, I am testing a script to find the last file within a folder.It can locate the correct file, but the resulting variable includes a period . within the file name.Here's the script:REM Copy the recent Friday evening's Diff Backup onto the drive G: My Passport device.@echo...
  4. I am unable to get the time stamp in file name by using batch script in Windows Server...

    in Windows 10 Gaming
    I am unable to get the time stamp in file name by using batch script in Windows Server...: I am unable to get the time stamp in file name by using batch script in Windows Server 2022 Datacenter 64-bit Version 21H2Build 20348.1487 . Could you please help me on this....
  5. I am unable to get the time stamp in file name by using batch script in Windows Server...

    in Windows 10 Software and Apps
    I am unable to get the time stamp in file name by using batch script in Windows Server...: I am unable to get the time stamp in file name by using batch script in Windows Server 2022 Datacenter 64-bit Version 21H2Build 20348.1487 . Could you please help me on this....
  6. I am unable to get the time stamp in file name by using batch script in Windows Server...

    in Windows 10 Software and Apps
    I am unable to get the time stamp in file name by using batch script in Windows Server...: I am unable to get the time stamp in file name by using batch script in Windows Server 2022 Datacenter 64-bit Version 21H2Build 20348.1487 . Could you please help me on this....
  7. Batch scripting

    in Windows 10 Software and Apps
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:Code and result:Code:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press...
  8. Batch scripting

    in Windows 10 Gaming
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:Code and result:Code:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press...
  9. Batch scripting

    in Windows 10 Network and Sharing
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press any key. echo Before...
  10. Get name of current diskette in A:\ with batch file

    in Windows 10 Network and Sharing
    Get name of current diskette in A:\ with batch file: I have a usb floppy drive installed and it is drive A:\ I am trying to make a batch file that will automatically copy the contents of a diskette in the drive a to a folder on one of my main drives. Is there a way to get the name of the diskette in the A: drive and use it as a...