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

  • Microsoft shrunk the TypeScript

    #​640 — May 25, 2023 Read on the Web JavaScript Weekly DeviceScript: TypeScript for Tiny Thingamabobs — DeviceScript is a new Microsoft effort to take the TypeScript experience to low-resource microcontroller-based devices. It’s compiled to a custom VM bytecode which can run in such constrained environments. (A bit like Go’s TinyGo.) It’s aimed at VS

    Posted by Posted on May 25, 2023
    0
  • Node.js 20 is fast(er)

    #​487 — May 23, 2023 Read on the Web The State of Node.js Performance in 2023 — Nearform’s Rafael Gonzaga reflects on the recent release of Node 20 and puts it through its paces against v18.16 and v16.20 with a few different benchmark suites running on a pretty typical EC2 instance. It goes into a

    Posted by Posted on May 23, 2023
    0
  • jQuery lives on; major changes teased

    #​639 — May 18, 2023 Read on the Web JavaScript Weekly Bun’s New Bundler: 220x Faster than webpack? — Bun is one of the newest JavaScript runtimes (built atop the JavaScriptCore engine) and focuses on speed while aiming to be a drop-in replacement for Node.js. This week’s v0.6.0 release is the ‘biggest release yet’ with

    Posted by Posted on May 18, 2023
    0
  • MS’s new tool for digging deep into V8

    #​486 — May 16, 2023 Read on the Web ‘This Page is Hosted on my Android Phone’ — Since it’s been linked on some pretty big sites already, I don’t feel too guilty about linking it here too 😆 This is a link to a blog being hosted from a $180 Android phone that’s running

    Posted by Posted on May 16, 2023
    0
  • Why Svelte is converting TypeScript to JSDoc

    #​638 — May 11, 2023 Read on the Web JavaScript Weekly The JavaScript Ecosystem is Delightfully Weird — There are plenty of examples of how JavaScript is weird but Sam focuses on the why. If you’ve been a JS developer for many years you’ll have seen it go through many phases and morph to fit

    Posted by Posted on May 11, 2023
    0
  • Getting recursive with Node 20.1

    #​485 — May 9, 2023 Read on the Web Node v20.1.0 (Current) Released — If you’re still catching your breath after the epic Node 20 release, don’t fear – 20.1 is a more typical bugfix, dependency update, and tweak-style affair. Michaël Zasso 💡 That said, the fs readdir and opendir functions get a new recursive option

    Posted by Posted on May 9, 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
  • Microsoft shrunk the TypeScript
  • Node.js 20 is fast(er)
  • jQuery lives on; major changes teased
  • MS’s new tool for digging deep into V8
  • Why Svelte is converting TypeScript to JSDoc
https://flatlogic.com/generator
COPYRIGHT © 2023 - Codepolice