Recent Questions

متن مرتبط با «powershell batch rename substring» در سایت Recent Questions نوشته شده است

Is there a way to download a file using CMD, VBS, or Powershell from a url

  • نیلوبلاگ

    I need a small script to download some programs. The URL's never change but the files do. Like when you download malwarebytes. Example: "https://downloads.malwarebytes.com/file/mbam_current/" The address doesnt change but the file name downloaded does. Every script i see, requires that you specify a file name. I dont want to do that, I want the script to pull the filename from the sites header which would include the version name of that file in that filename. I cant seem to find any way of doin...

    ادامه مطلب
  • Powershell: batch rename and keep extension?

  • نیلوبلاگ

    Is it possible to batch rename a series of files and keep the original extensions in a sequence? For example, if you had the files in a directory: dogfile1.jpg, wolffile493.png, and dogfile59.jpg and wanted to rename them: dog1.jpg, dog2.png, dog3.jpg I saw you can use this to batch rename but it renames it to the extension you select (ex. jpg): $nr=1 Dir | %{Rename-Item $_ -NewName (‘NewFile{0}.jpg’ -f $nr++)} Let's block ads! بخوانید...

    ادامه مطلب
  • Convert JSON to YAML using PowerShell

  • نیلوبلاگ

    I have a json data like this. sample.json [ { "id": 0, "name": "Cofine", "title": "laboris minim qui nisi esse amet non", "description": "Consequat laborum quis exercitation culpa. Culpa esse sint consectetur deserunt non.", "website": "cofine.com", "image": "http://placehold.it/32x32", "labels": ["blue", "red"], "labels_link": ["http://cofine.com/labels/blue","http://cofine.com/labels/red"], }, { "id": 1, "name": "Zomboid", "title": "adipisicin...

    ادامه مطلب
  • Powershell: Read out values of registry keys

  • نیلوبلاگ

    Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top ...

    ادامه مطلب
  • How do I create a new remote repository in git with PowerShell?

  • نیلوبلاگ

    I can push and pull to repositories I've made from github, but how can I create a new repository from the PS cmd line? ...

    ادامه مطلب
  • Why does this FFMPEG command when called from Powershell generate white noise?

  • نیلوبلاگ

    I'm trying to create a Powershell script that watches a folder for new MP3 files and converts them to M4A format using FFMPEG and FDK AAC encoder. Since fdkaac.exe won't take MP3 files as input, I use this command, which pipes from ffmpeg: ffmpeg -i $path -f caf - | fdkaac -p5 -b64 - -o $outfolder$outname.m4a This works just fine if I enter it into a command prompt and the resulting M4A file that's generated has no problems. However if I run this from Powershell, the M4A file is created but co...

    ادامه مطلب
  • My batch file opens an extra command prompt

  • نیلوبلاگ

    I have a batch file that I am making as a little joke for my friend. It's supposed to make a batch file in the startup folder that opens the youtube link to a rick roll. My problem is that whenever I run it, it opens an empty command prompt. It still runs the code you see bellow, and it also opens the youtube link like it should and it closes both normal windows normally. Here's the code. @echo off cd C:Users%useame%AppDataRoamingMicrosoftWindowsStart MenuProgramsStartup echo @echo off > star...

    ادامه مطلب
  • How to loop all files in powershell to zip every file to its old name

  • نیلوبلاگ

    I'm trying to zip every file in a directory but I can't seem to get it to use the directory or the old file name. It needs to delete the old file so that it's protected in the zip file. This is what I came up with so far: $files = Get-ChildItem "D:Backuptestinput*" | ForEach ($filename in $files) { $content = Get-Content $_.FullName & "C:Program FilesWinRARRar.exe" a -m0 -hps8Cs7y7RfLjYgYb -k -df $filename.rar } Let's block ads! بخوانید...

    ادامه مطلب
  • How to create scheduled task of a batch file (Windows)?

  • نیلوبلاگ

    I have a batch file containing something like this C:Python27Scriptstwistd.py -n -y C:Program Files (x86)POSatidps.py pause How to create scheduled task to run at startup (to all user including non admin), with the command prompt windows always appear, as like when I run the batch script. So it should gonna be like this. I'm new in Windows system administration things, so any detailed answer will be appreciated, thank you. Let's block ads! بخوانید...

    ادامه مطلب
  • How do I write a batch script that reads two columns of a CSV file at a time and executes a program that utilizes the retrieved data?

  • نیلوبلاگ

    I am using a specialist java application which is used in my field (geology). The way I have written my batch files up until now is to take one CSV file at a time and access and process that data. But now I have put all the data from each CSV into one CSV file (with each dataset being represented in two adjacent columns). I want to take the first two columns, process that data in the java application and then output the results in a pdf. I want to iterate through the entire CSV (2 columns at a t...

    ادامه مطلب
  • Delay batch files in between commands

  • نیلوبلاگ

    How do I delay batch files in between commands, with say a once second delay, or even less? I've tried using the ping null command, but it never seems too work for me? ping 127.0.0.1 -n 1 > null But it never seems too work. Is there another - yet easier way too do this? Thanks. Let's block ads! بخوانید...

    ادامه مطلب
  • How to delete file by file with batch

  • نیلوبلاگ

    For your batch file change %f to %%f you dont need the touch command it's from gnuwin32 or cygwin, I used it to create 3 files, q w and e. C:blah>touch q w e<ENTER> C:blah>for %f in (*.*) do @(echo deleting %f & del %f) deleting e deleting q deleting w C:blah> note- to understand it or do it from scratch try for %f in (*.*) do echo %f and one can work it out from there. Let's block ads! بخوانید...

    ادامه مطلب
  • Using vlc to batch generate snapshots say every 2-3 minutes or os?

  • نیلوبلاگ

    Is there a way to batch generate snapshots every 2-3 minutes or so in Debian. I have a video of approximately 15 minutes and while I could use hotekey 's' to manually generate snapshots . Using vlc 2.2.4 Weathermax. ...

    ادامه مطلب
  • Can a Windows Batch Script do this?

  • نیلوبلاگ

    I want to create a Windows Batch file which works like this: Run an exe with specified arguments. Wait for the complete execution of this exe. (This EXE is essentially recording an online video stream and is supposed to record it for 1 hour 5 minutes) If, however, exe exits (stops recording & exits execution) before the stipulated time period (1 hour 5 minutes), execute the same exe with different argument for the remaining duration. Kill the EXE execution when the total time period (includi...

    ادامه مطلب
  • Enabling DHCP via PowerShell results in 2 WiFi connections to same network

  • نیلوبلاگ

    I have a VM on my network setup as a gateway that I use sometimes, while most of the time I just leave my PCs configured to use DHCP and just have everything go through the router. I had been swapping back and forth manual through the connection properties form but I've decided to try and make PowerShell scripts to simplify the process. I also disable IPv6 when routing through the VM, but reenable it when I use DHCP. To switch to using the VM as a Gateway I use this: # Get the adapter to change...

    ادامه مطلب
  • Is there a way to have a batch script restore the Quick Launch bar in Windows 7?

  • نیلوبلاگ

    Every so often, my Quick Launch toolbar disappears. It might be when my laptop completely runs out of battery (e.g. while asleep) and even the CMOS time is zeroed. Or it might be certain Windows updates, I'm not sure. It'd be nice if I could write a BATCH script that does what I manually do, which is going to New Toolbar > %appdata%MicrosoftInteet ExplorerQuick Launch, disabling "Show Text" and "Show Title," and switching to small icons. I don't know if any of that is possible via automation,...

    ادامه مطلب
  • how long does it take to setup hot folders and is powershell the best to use?

  • نیلوبلاگ

    I am hoping any experts out there in the field of powershell can help me. I have 0 experience in scripting but i need scripts to be made to execute as follows : I need folders to be made as hotfolders so the following would happen: my downloads folder to move downloaded files to relevant folders/sub folders according to file name.So for example, if the downloaded file has the words 1ft x 1ft, then move to 1ft x 1ft folder) once moved to the relevant folder the folder can then carry certain actio...

    ادامه مطلب
  • Windows 10 PowerShell setting up split tunneling

  • نیلوبلاگ

    (my first question, sorry if I haven't followed the protocol exactly) I am trying to enable split tunneling on my laptop (Windows 10), I leaed one has to use PowerShell to do it in Windows 10: Windows 10 split tunneling But whey I type that command: set-vpnconnection office -splittunneling $True I get an error message: A parameter cannot be found that matches parameter name 'vpnconnection'. Could someone help please? Thanks This entry passed through the Full-Text RSS service - if this is your co...

    ادامه مطلب
  • input same line as echo batch file

  • نیلوبلاگ

    Cannot seem to get this exactly right, trying to setup a batch file to do some network commands, such as ping. I have the following code: echo Please enter the IP Address to TELNET echo IP Address: set /p IP_Addr= I can't seem to get the input for IP Address on the same line as the echo. I tried using echo|set, but don't know if I've used it correctly. Any ideas? This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please...

    ادامه مطلب
  • I need a windows batch file which will run at startup and stream audio over my local network [on hold]

  • نیلوبلاگ

    Check out the Chriscam on livestream. https://livestream.com/accounts/20408219/events/5782272?t=1468022368949 I am adding a high definition camera as the source for an upgraded Chriscam but the audio pickup is too close to Chris' television and high powered audio speakers and need to input the audio from a source closer to him. Chris' computer is a windows Surface. Chris loves YouTube and especially country music which he listens too at the max volume we have set his speakers to output. The YouT...

    ادامه مطلب