Windows 10: Batch Script Adding a Period . to File Name

Discus and support Batch Script Adding a Period . to File Name in Windows 10 Software and Apps to solve the problem; 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... Discussion in 'Windows 10 Software and Apps' started by vRah, Sep 23, 2023.

  1. vRah Win User

    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 onset srcDir=F:\Backup\Differential Backupset destdir=G:\My Passport\Differential Backupcd /d F:\Backup\Differential BackupFOR /f %f IN 'DIR /b /od *.zip' DO @SET last=%fecho The most recently created file is %last%:::echo "%last" ::::eofpauseThis is the Windows Command results:Microsoft Windows [Version 10.0.19045.3448

    :)
     
  2. HAT
    hat Win User

    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.
     
  3. Flava0ne Win User
    Creating Shortcuts with Batch File

    Tried both of the VB Scripts that you provided and adding the 9 switch to the batch file but neither was able to create a shortcut to my desktop.
     
    Flava0ne, Sep 23, 2023
    #3
  4. yegorsw Win User

    Batch Script Adding a Period . to File Name

    Run the audio troubleshooter from a batch script

    I have an automated home theatre setup - a batch script that enables my TV as a display, and changes the TV to be my primary display (so games and apps open on my TV instead of my monitor).

    The same script also changes my default audio device to be the TV.

    The problem is every time I turn off my TV, it disappears from the list of audio output devices in Windows 10, and even when I turn it back on, it does not appear in the list. However, if I RIGHT CLICK on the audio icon and select "troubleshoot sound problems"
    and immediately cancel/close the troubleshooter, the TV is automagically added to my list of output devices.

    My question is - is there any way to have this troubleshooter be launched from a batch script and instantly closed? Alternatively, is there a way to force a refresh of the audio devices through a batch script?
     
    yegorsw, Sep 23, 2023
    #4
Thema:

Batch Script Adding a Period . to File Name

Loading...
  1. Batch Script Adding a Period . to File Name - Similar Threads - Batch Script Adding

  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 shorten file names

    in Windows 10 Gaming
    Batch shorten file names: Hi everyone!I have a bunch of files for work, which all have a name like 'FunTimes-party2020', 'BossMan-party2020', 'GroupPhoto-party2020' just as a example.I need to shorten the names of the files in the example, remove the "party2020", but there are hundreds of files. Is...
  4. Batch shorten file names

    in Windows 10 Software and Apps
    Batch shorten file names: Hi everyone!I have a bunch of files for work, which all have a name like 'FunTimes-party2020', 'BossMan-party2020', 'GroupPhoto-party2020' just as a example.I need to shorten the names of the files in the example, remove the "party2020", but there are hundreds of files. Is...
  5. 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...
  6. 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...
  7. 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...
  8. windows short file name not the same when batch script accesses file on NAS

    in Windows 10 Network and Sharing
    windows short file name not the same when batch script accesses file on NAS: I first asked over at community for my DS918+ file system but it has been a week and all that happened was the moderator corrected my spelling of their product name. asked for help here first When "win_build" is shorted it has always been (AFAICT) "win_bu~1" but on my...
  9. Running PowerShell script as a batch file

    in Windows 10 Network and Sharing
    Running PowerShell script as a batch file: Can I run the Power Shell line: "C:\Windows\System32>get-appxpackage *3dbuilder* | remove-appxpackage" from a .Bat file? ***Original title: Removing bloatware***...
  10. adding a period

    in Windows 10 Customization
    adding a period: When I doulble tap the space bar, the period is not added. The feature is turned on https://answers.microsoft.com/en-us/windows/forum/all/adding-a-period/c6b8ee3e-80db-445a-a2a5-dc6b691b476a