Recent Questions

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

Laravel organise migrations into folders

  • نیلوبلاگ

    When a project grows the migrations folder can contain a lot of migration, ever wanted to desperate them into folders? tus out it's easy to so. All you need to do is tell Laravel where to read the migrations from. In your AppServiceProvider.php boot call, you can call $this->loadMigrationsFrom() and give it a path of all the folder locations: $migrationsPath = database_path('migrations'); $directories = glob($migrationsPath.'/*', GLOB_ONLYDIR); $paths = array_merge([$migra...

    ادامه مطلب
  • 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! بخوانید...

    ادامه مطلب
  • Ctrl + Click + Drag Deselects Selected Items and System Folders Have a Tag

  • نیلوبلاگ

    Just like the title says, recently I've been noticing that when I'm selecting a group of items in a folder if I select some and click and drag over them again it deselects them. This never never happened before a couple weeks ago. I believe it started when I had an IT guy do a checkup on my PC. My System folders also have an annoying tag that says "System Folder" now but that can be easily overlooked. Examples: http://ptscr.com/cax3uc http://ptscr.com/cax3xp P.S: Never letting an IT guy touch my...

    ادامه مطلب
  • 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...

    ادامه مطلب
  • How to make this script read all subfolders

  • نیلوبلاگ

    I found script opening random files. I changed one thing and now it open random file from C:/ Can somebody tell me how to change it to open random file from C:/ and all subfolders? @echo off & setlocal :: start of main rem Set your path here: set "workDir=C:" rem Read the %random%, two times is'nt a mistake! Why? Ask Bill. rem In fact at the first time %random% is nearly the same. @set /a "rdm=%random%" set /a "rdm=%random%" rem Push to pushd "%workDir%" rem Count all files in your path....

    ادامه مطلب
  • How can I count the number of folders in a specific folder level using Linux terminal?

  • نیلوبلاگ

    I have a very specific directory tree on my music library. I would like to count all of the albums, excluding all the subdirectories. For instance, given this directory tree: /music/ /music/Davis, Miles/ (<--1. interpret) /music/Davis, Miles/Kind of Blue/ <--1. album /music/Davis, Miles/Tutu/ <--2. album /music/Hendrix, Jimi/ (<--2. interpret) /music/Hendrix, Jimi/Axis Bold As Love/ <--3. album /music/Hendrix, Jimi/Electric Ladyland/ <--4. album /music/Hendrix, Jimi/Electric La...

    ادامه مطلب
  • 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! بخوانید...

    ادامه مطلب
  • Directing file downloads to different folders based on file type

  • نیلوبلاگ

    Is there a native solution for windows 10 to cause downloads to automatically go into folders based on their file type? For example all files that are applications are directed to a folder called programs. I'm not sure where to start looking into this so I don't have a lot to go on. 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...

    ادامه مطلب
  • How to find folders

  • نیلوبلاگ

    I'm looking for a way to find and remove every folder which contains files with extension .drt in it. It's a networkshare and structure is shown below, in this case I want to delete subfolder 1 and 3 \networkshare \profiles \001 \002 \003 \folder1 \subfolder1 \*.drt \folder2 \subfolder2 \folder3 \subfolder3 \*.drt Let's block ads! بخوانید...

    ادامه مطلب
  • 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! بخوانید...

    ادامه مطلب
  • How to hide the Search Folders folder in Outlook 365

  • نیلوبلاگ

    Is there a way to hide the Search Folders in Outlook? I have Outlook 2016 with Office 365. I'm using IMAP from my email provider, not Microsoft Exchange. I would like to hide the unused "Search Folders" folder, but can't seem to do it. It doesn't seem to be a real folder. I tried MFCMAPI, but "Search Folders" isn't an entry in the list of the folders. Here is my folder structure in the left side Email navigation pane: [email protected] Inbox Drafts Outbox Sent spam Trash Search Folders Th...

    ادامه مطلب
  • How to move files with a specific file extension from within a parent folder as well as its' subfolders to a new folder

  • نیلوبلاگ

    I want to move all files with extensions such as: .JPEG .MP3 .MP4 .MOV .AVI .PDF .PSD .WAV .TXT ...to new parent folders named after the extension of the files contained therein. Currently I have too many files within so many subfolders (under one parent folder) to do this manually. I tried searching the parent folder with * to then sort by file type but it is too much and my system either freezes or is unusable/slow. please assume I know nothing in regard to scripts/batch files but I can follow...

    ادامه مطلب