Skip to content

Codepolice

  • ⤫

Copy a folder with Robocopy

Posted by Judy Alvarez Posted on February 28, 2022March 3, 2022
0

I’m playing around a bit with PhoneGap at the moment. I wanted to make a script that copies all my javascript, HTML, images and CSS from my Visual Studio project folder to each of the different PhoneGap projects for iOS, Android, and so on.

Visual Studio has a feature to execute commands after the project is built and it felt like the simplest solution. I tried to add a command like robocop c:myprojcss c:myandroidproj it worked but the thing was that I wanted to copy the folder AND the files in it and I couldn’t figure out how to do that. Maybe I’m just stupid, I don’t know.

Anyway, I figured out how to do it in a good way finally.

robocopy $(ProjectDir) C:JavaMyProjassetswww *.html *.js *.css *.png *.gif *.jpg /S

This will copy all the specified filetype, ignore files like .csproj, and stuff like that. The S stands for “Copy directory structure but ignores empty folders”.

Categories: JavascriptTagged: .net 5 asp.net mvc, .net core vs asp.net mvc, .net mvc jobs, .net mvc redirect to url, .net mvc vs web api, 20486 developing asp net mvc 4 web applications, asp .net mvc 5, asp net core mvc post, asp net mvc 5 book, asp net mvc actionfilter, asp net mvc crud operations using datatable, asp net mvc examples, asp net mvc for beginners, asp net mvc form validation, asp net mvc pattern, asp net mvc remote jobs, calendar asp net mvc, crystal report in asp net mvc, ecommerce asp net mvc, expert asp net web api 2 for mvc developers pdf, how to integrate google map in asp net mvc, install asp net mvc 4 for visual studio 2017, introduction to asp net mvc, learn asp net mvc 5, mvc dot net interview questions, mvc in dot net, mvc net core 5, mvc tutorial for beginners in net c# with example pdf, net mvc core, recaptcha v2 asp net mvc

Post navigation

Previous Previous post: Make the Git GUI appear after you publish a Web Project in Visual Studio 2010
Next Next post: Batch Optimize Png, Jpg, and Gif images in Windows (and Visual Studio)

Related Posts

  • Ways to remove event listeners

    #​624 — February 3, 2023 Read on the Web JavaScript Weekly You’ve Got Options for Removing Event Listeners — Unnecessary event listeners can cause all sorts of odd problems so it’s good to clean them up when you don’t need them anymore. How? There are several approaches and Alex looks at their pros and cons. (once

    Posted by Posted on February 3, 2023
    0
  • SQL in your JavaScript

    #​472 — February 2, 2023 Read on the Web AlaSQL.js 3.0: Isomorphic JavaScript SQL Database — A SQL database you can use in Node.js and the browser. The interesting bit, for me, is how it opens up the idea of using SQL to query JavaScript objects – as in this example. “The library adds the

    Posted by Posted on February 2, 2023
    0
  • Astro 2.0 and TypeScript 5.0 beta

    #​623 — January 27, 2023 Read on the Web JavaScript Weekly Astro 2.0: The Next-Gen ‘Islands’-Oriented Web Framework — 2.0 includes hybrid rendering (mixing of SSR and SSG outputs), type safety for Markdown & MDX, and an upgrade to Vite 4.0. Astro is worth exploring when performance is key as it works with popular frameworks

    Posted by Posted on January 27, 2023
    0
  • Automating the desktop with Node

    #​471 — January 26, 2023 Read on the Web Nut.js 3.0: Use Node for Desktop Automation — Take control of your desktop environment (Windows, macOS or Linux) from code with control over keyboard and pointer, plus you get some image matching possibilities too. Open source but with optional sponsor-only extension packages. GitHub repo and what’s new

    Posted by Posted on January 26, 2023
    0
  • Why document.write() is bad

    #​622 — January 20, 2023 Read on the Web JavaScript Weekly Why Not document.write()? — Many moons ago, document.write was a mainstay of client-side JavaScript code, but it’s long been considered a bad practice – why? Harry digs in, noting that it “guarantees both a blocking fetch and a blocking execution, which holds up the

    Posted by Posted on January 20, 2023
    0
  • We’re going on a memory leak hunt

    #​470 — January 19, 2023 Read on the Web Fixing a Memory Leak in a Production Node App — Kent encountered a variety of weird memory and CPU usage spikes in his Node-powered app and decided to figure out what was going on. This post walks through his complete journey, with plenty of side problems

    Posted by Posted on January 19, 2023
    0
Judy Alvarez

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Codepolice

  • Github
  • Atlassian
  • Flatlogic
  • Xero
  • Jetbrains
  • Figma
  • Ways to remove event listeners
  • SQL in your JavaScript
  • Astro 2.0 and TypeScript 5.0 beta
  • Automating the desktop with Node
  • Why document.write() is bad
https://flatlogic.com/generator
COPYRIGHT © 2023 - Codepolice